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

[libvirt] [PATCH 4/6] xend: urlencode: Properly escape '&'



Since we send the sexpr to xend via HTTP, we need to properly escape
'&'

Signed-off-by: Cole Robinson <crobinso redhat com>
---
 src/xen/xend_internal.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index d6d66bd..3ccadde 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -710,6 +710,7 @@ urlencode(const char *string)
         switch (string[i]) {
             case ' ':
             case '\n':
+            case '&':
                 snprintf(ptr, 4, "%%%02x", string[i]);
                 ptr += 3;
                 break;
-- 
1.7.3.2


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