[libvirt] [PATCH 2/4] conf: Fix parsing python style triple quotes

Eric Blake eblake at redhat.com
Fri Nov 19 21:56:43 UTC 2010


On 11/19/2010 02:51 PM, Cole Robinson wrote:
> On 11/19/2010 03:38 PM, Eric Blake wrote:
>> On 11/19/2010 09:15 AM, Cole Robinson wrote:
>>> An incorrect check broke matching the closing set of quotes. Update
>>> tests to cover this case for XM config files, and update the domain schema
>>> to allow more path characters.
>>>
>>> -      <param name="pattern">/[a-zA-Z0-9_\.\+\-&/%]*</param>
>>> +      <param name="pattern">/[a-zA-Z0-9_\.\+\-\\&"'<>/%]*</param>
>>
>> So far, so good...
>>
>>>      </data>
>>>    </define>
>>>    <define name="devicePath">
>>>      <data type="string">
>>> -      <param name="pattern">/[a-zA-Z0-9_\+\-/%]+</param>
>>> +      <param name="pattern">/[a-zA-Z0-9_\+\-\\&"'<>/%]+</param>
>>
>> but given that a devicePath can't have '.', should it really be allowed
>> to have other characters like &, ", ', <, or >?
>>
> 
> I didn't notice the lack of '.'  but should probably also be added. From
> the XML point of view, a devicePath could really just be any old FS path.

If that's the case, then can we consolidate things rather than repeating
the same pattern multiple times?  That is, can the schema use _just_
filePath and absFilePath, rather than confusing things by adding devicePath?

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101119/441a5176/attachment-0001.sig>


More information about the libvir-list mailing list