Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1132191 - [Windows sysprep] Run Once: Special characters are not encoded in XML sysprep files for Windows 7, 8, 2008, 2012
[Windows sysprep] Run Once: Special characters are not encoded in XML sysprep...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.4.0
x86_64 All
medium Severity high
: ---
: 3.5.0
Assigned To: Shahar Havivi
Pavel Novotny
virt
: ZStream
Depends On: 1122160
Blocks: 1135920 rhev3.5beta 1156165
  Show dependency treegraph
 
Reported: 2014-08-20 17:15 EDT by Jake Hunsaker
Modified: 2015-07-10 05:08 EDT (History)
14 users (show)

See Also:
Fixed In Version: vt2.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1122160
: 1135920 (view as bug list)
Environment:
Last Closed: 2015-02-11 13:08:28 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 31957 None None None Never
oVirt gerrit 31973 None None None Never
oVirt gerrit 31974 ovirt-engine-3.4 MERGED backend: sysprep custom variables should be in CDATA section Never
Red Hat Product Errata RHSA-2015:0158 normal SHIPPED_LIVE Important: Red Hat Enterprise Virtualization Manager 3.5.0 2015-02-11 17:38:50 EST

  None (edit)
Description Jake Hunsaker 2014-08-20 17:15:25 EDT
+++ This bug was initially created as a clone of Bug #1122160 +++

Description of problem:
When running a sealed Windows 7/7x64/8/8x64/2008/2008x64/2012x64 VM with sysprep floppy attached, all values provided from Run Once dialog are put in the sysprep file as plain-text, even when these Windows versions are using XML format for sysprep file, thus allowing to create a syntactically incorrect sysprep file.

Version-Release number of selected component (if applicable):
ovirt-engine-3.5.0-0.0.master.20140629172257.git0b16ed7.el6.noarch (beta)

How reproducible:
100%

Steps to Reproduce:
1. Have a "sealed" Windows VM, any of version 7, 7x64, 8, 8x64, 2008, 2008x64 or 2012x64
2. In Run Once dialog enter as the Admin Password value 'pass</word>'
3. Run the VM and watch the Windows initialization process

Actual results:
The Windows initialization fails on a parsing error of the unattend file.
If you check it (A:\sysprep.inf), you see the admin password is put in the XML as plain-text:

  <AdministratorPassword>
    <Value>pass</word></Value>
    <PlainText>true</PlainText>
  </AdministratorPassword>


Expected results:
For Windows versions using XML sysprep files, all special characters should be encoded, such as: in GUI enter value 'pass</word>' and in sysprep file will be value 'pass&lt;/word&gt;'.

Additional info:

+++ End of cloned data +++


Cloning this to RHEV. This has been seen as far back as 3.2 and in this case 'Run Once' was *not* used.
Comment 2 Eyal Edri 2014-08-31 04:14:07 EDT
can you please clone the bug to 3.4.z?
also i see the master/3.5 patch is missing from the bug.
Comment 3 Michal Skrivanek 2014-09-01 03:44:18 EDT
(In reply to Eyal Edri from comment #2)
patches on 3.5/master are using the corresponding oVirt bug
Comment 6 Pavel Novotny 2014-09-12 11:37:11 EDT
Verified in rhevm-3.5.0-0.11.beta.el6ev.noarch (vt3).

All variables in XML sysprep template files are now placed into CDATA section so all characters are represented the same way as they are entered.
For example password 'pass</word>' now doesn't cause parsing error and it's set in the Windows guest.
Note that the above doesn't apply to *custom* sysprep file, where user has to take care about the sysprep file validity by himself.
Comment 8 errata-xmlrpc 2015-02-11 13:08:28 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0158.html

Note You need to log in before you can comment on or make changes to this bug.