[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] esx: Handle name escaping properly



On Wed, Oct 13, 2010 at 10:47:57PM +0200, Matthias Bolte wrote:
> 2010/10/13 Daniel Veillard <veillard redhat com>:
> > On Wed, Oct 13, 2010 at 11:06:44AM +0200, Matthias Bolte wrote:
> >> VMware uses a mix of percent-, pipe- and base64-encoding in
> >> different combinations in different places.
> >>
> >> Add a testcase for this.
> >> ---
> >>  src/esx/README                           |   25 ++++
> >>  src/esx/esx_driver.c                     |   72 ++++++-----
> >>  src/esx/esx_storage_driver.c             |   42 ++++++-
> >>  src/esx/esx_util.c                       |  198 ++++++++++++++++++++++++++++++
> >>  src/esx/esx_util.h                       |   18 +++
> >>  src/esx/esx_vi.c                         |    6 +
> >>  src/esx/esx_vmx.c                        |   88 +++++---------
> >>  tests/esxutilstest.c                     |   51 ++++++++
> >>  tests/xml2vmxdata/xml2vmx-annotation.vmx |    2 +-
> >>  9 files changed, 405 insertions(+), 97 deletions(-)
> >
> >  That sounds vaguely familiar, I think I reviewed such a patch last
> >  month, right ?
> 
> I've sworn about this on IRC last week, so that's probably why it
> sounds familiar to you :)

  hum, maybe I got confused then ...


> +static struct testDatastoreItem datastoreItems[] = {
> +    { "normal", "normal" },
> +    { /* "Aä1ö2ü3ß4#5~6!7§8/9%Z" */
> +      "A\303\2441\303\2662\303\2743\303\2374#5~6!7\302\2478/9%Z",
> +      "A+w6Q-1+w7Y-2+w7w-3+w58-4+Iw-5+fg-6+IQ-7+wqc-8+JQ-2f9+JQ-25Z" },
> +    { /* "Z~6!7§8/9%0#1\"2'3`4&A" */ "Z~6!7\302\2478/9%0#1\"2'3`4&A",
> +      "Z+fg-6+IQ-7+wqc-8+JQ-2f9+JQ-250+Iw-1_2'3+YA-4+Jg-A" },
> +    { /* "標準語" */ "\346\250\231\346\272\226\350\252\236", "+5qiZ5rqW6Kqe" },
> +    { "!\"#$%&'()*+,-./0123456789:;<=>?",
> +      "+IQ-_+IyQl-25+Jg-'()_+Kw-,-.+JQ-2f0123456789_+Ow-_+PQ-__" },
> +    { "A Z[\\]^_B", "A Z+WyU-5c+XV4-_B" },
> +    { "A`B {|}~DEL", "A+YA-B+QHs-_+fX4-DEL" },
> +    { /* "hÀÁÂÃÄÅH" */ "h\303\200\303\201\303\202\303\203\303\204\303\205H",
> +      "h+w4DDgcOCw4PDhMOF-H" },
> +    { /* "A쿀Z" */ "A\354\277\200Z", "A+7L+A-Z" },
> +    { /* "!쿀A" */ "!\354\277\200A", "+Iey,gA-A" },
> +    { "~~~", "+fn5+" },
> +    { "~~~A", "+fn5+-A" },
> +    { "K%U/H\\Z", "K+JQ-25U+JQ-2fH+JQ-5cZ" },
> +    { "vvv<A\"B\"C>zzz", "vvv_A_B_C_zzz" },
> +};

  I assume in comments it's harmless, so ACK :-)

   thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]