]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't treat plus as a space in url decode
authorYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 9 Feb 2012 01:08:39 +0000 (17:08 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 9 Feb 2012 01:11:01 +0000 (17:11 -0800)
Any special character encoding should be done through %hex. The
plus sign is a valid character in object names, and in user id
(when used in signed urls).

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
src/rgw/rgw_common.cc

index cd926f41cd2535e9a1d3dac6eeadd686340e3452..7acdfe05ef41c2d358959b6dd12501b6bb0e46b8 100644 (file)
@@ -386,12 +386,7 @@ bool url_decode(string& src_str, string& dest_str)
 
   while (*src) {
     if (*src != '%') {
-      if (*src != '+') {
-       dest[pos++] = *src++;
-      } else {
-       dest[pos++] = ' ';
-       ++src;
-      }
+      dest[pos++] = *src++;
     } else {
       src++;
       if (!*src)