Bug 1483295

Summary: Network name with special character '&' is added with prefix 'amp'
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: BLL.NetworkAssignee: Leon Goldberg <lgoldber>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: medium Docs Contact:
Priority: high    
Version: 4.2.0CC: bugs, danken
Target Milestone: ovirt-4.1.7Flags: rule-engine: ovirt-4.1+
rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.0-0.0.master.20170901193740.git7900511.el7.centos.noarch.rpm Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-13 12:27:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1458407    
Attachments:
Description Flags
screenshots and engine log
none
new screeshot none

Description Michael Burman 2017-08-20 08:19:15 UTC
Created attachment 1315897 [details]
screenshots and engine log

Description of problem:
Network name with special character '&' is added with prefix 'amp' and sometimes created without vNIC profile.

When creating name with special character '&', it added with prefix 'amp'.
If creating network such as: $fffffff , it will be created without vNIC profile and will look like this in the engine - &amp;fffffff

If creating network like this : fffffdsfds& , it will look like this in the engine - fffffdsfds&amp;

Version-Release number of selected component (if applicable):
4.2.0-0.0.master.20170818152502.gita8c361f.el7.centos

How reproducible:
100%

Steps to Reproduce:
1. Create network &newnet1
2. Create network newnet1&

Actual results:
1. Network created as - &amp;newnet1
2. Network created as - newnet1&amp;

Expected results:
No prefix 'amp' should be added to the special character '&'

Comment 1 Yaniv Kaul 2017-08-21 06:03:23 UTC
I really don't think we need to support any character in a network name. '&' for example is not really something one cannot do without.
Dan - CLOSE-WONTFIX?

Comment 2 Dan Kenigsberg 2017-08-21 06:17:47 UTC
*something* has to be done regarding this bug. currently we have the gate open and evil chars can storm inside, creating havoc. If we fail to fix Engine to properly handle xml-special chars, we can avoid this bug by blocking their input.

Comment 3 Dan Kenigsberg 2017-08-29 14:58:19 UTC
vnic profiles are not created due to unrelated bug 1485927

Comment 4 Michael Burman 2017-09-04 05:51:45 UTC
This should be fixed for the VM's vNIC profile as well(as showed in attached screenshots).
The 'amp' prefix still displayed in the VM's network interfaces profiles list.

Comment 5 Michael Burman 2017-09-04 05:52:26 UTC
Created attachment 1321677 [details]
new screeshot

Comment 6 Michael Burman 2017-09-10 08:25:35 UTC
This should be fixed for 4.1 as well. I don't see patches for 4.1, only for master.

Comment 7 Dan Kenigsberg 2017-09-10 08:32:03 UTC
Oh, I thought that the problem shows up only in the new UX.

Comment 8 Michael Burman 2017-09-24 05:39:55 UTC
Verified on - rhevm-4.1.7.1-0.1.el7.noarch