Bug #500

oneimage addattr doesn't validate invalid parameters

Added by Andrés Ambrois over 10 years ago. Updated about 10 years ago.

Status:ClosedStart date:02/25/2011
Priority:NormalDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:Core & System
Target version:Release 3.0
Resolution:fixed Pull request:
Affected Versions:

Description

Neither oneimage addattr nor oned validate attribute names which are invalid XML tags, thus breaking the XML parser.

[oneadmin@node01 root]$ oneimage list
ID USER NAME TYPE REGTIME PUB PER STAT #VMS
0 oneadmin CentOS 5.5 Install D CD Dec 03, 2010 16:45 Yes No rdy 0
10 oneadmin Build Server OS Dec 07, 2010 19:48 Yes No used 1
11 oneadmin SS7 Server 01 OS Dec 08, 2010 00:04 Yes No rdy 0
12 oneadmin 20GB Empty Drive OS Dec 21, 2010 11:36 Yes No rdy 0
13 oneadmin CentosBase OS Dec 21, 2010 11:59 No No used 1
15 oneadmin CentosUpdated OS Feb 09, 2011 13:06 No No used 1
16 oneadmin RedHat 6.0 i368 Inst CD Feb 23, 2011 15:11 Yes No used 1
17 oneadmin RHEL6Base OS Feb 23, 2011 18:44 No No used 1
9 oneadmin NL CentOS OS Dec 06, 2010 21:05 No No rdy 0

[oneadmin@node01 root]$ oneimage addattr 9 16 DRIVER
[oneadmin@node01 root]$ oneimage list
ID USER NAME TYPE REGTIME PUB PER STAT #VMS
0 oneadmin CentOS 5.5 Install D CD Dec 03, 2010 16:45 Yes No rdy 0
10 oneadmin Build Server OS Dec 07, 2010 19:48 Yes No used 1
9 oneadmin NL CentOSNL CentOS OS Dec 06, 2010 21:05 No No rdy 0
[oneadmin@node01 root]$ oneimage show 9
IMAGE INFORMATION
ID : 9
NAME : NL CentOSNL CentOS
TYPE : OS
REGISTER TIME : 12/06 19:05:18
PUBLIC : No
PERSISTENT : No
SOURCE : /var/lib/one//images/afa466ff89db24ffe529561a7f699818d390dc3b
STATE : rdy
RUNNING_VMS : 0

IMAGE TEMPLATE

[oneadmin@node01 root]$ mysql nebula
mysql> select * from image_pool where oid = 9;
---------+-----------+------+--------+------------+------------+---------------------------------------------------------------+-------+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | oid | uid | name | type | public | persistent | regtime | source | state | running_vms | template |
---------+-----------+------+--------+------------+------------+---------------------------------------------------------------+-------+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 9 | 0 | NL CentOS | 0 | 0 | 0 | 1291669518 | /var/lib/one//images/afa466ff89db24ffe529561a7f699818d390dc3b | 1 | 0 | <TEMPLATE><16><![CDATA[DRIVER]]></16><DEV_PREFIX><![CDATA[hd]]></DEV_PREFIX><DRIVER><![CDATA[qcow2]]></DRIVER><NAME><![CDATA[NL CentOS]]></NAME><TYPE><![CDATA[OS]]></TYPE></TEMPLATE> |
---------+-----------+------+--------+------------+------------+---------------------------------------------------------------+-------+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql>

History

#1 Updated by Ruben S. Montero about 10 years ago

  • Target version changed from Release 2.0.1 to Release 3.0

#2 Updated by Ruben S. Montero about 10 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

This has been solved as part of #576. Thanks for the feedback!

Also available in: Atom PDF