]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw-admin: convert user email addresses to lower case
authorMatt Benjamin <mbenjamin@redhat.com>
Mon, 18 Jan 2016 20:06:19 +0000 (15:06 -0500)
committerNathan Cutler <ncutler@suse.com>
Sun, 13 Nov 2016 10:21:50 +0000 (11:21 +0100)
Fixes the email address inconsistency documented in upstream
Ceph BUG #13598

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 4c438dbbc0e6eda6b9a3018d60019a1a780d6f65)

src/rgw/rgw_user.h

index d0f43b96b2e077f171d5bf3a46df9d2f19632266..21dd2e540c980e05c0ee115f8c8ea860ad5834ff 100644 (file)
@@ -5,6 +5,8 @@
 #define CEPH_RGW_USER_H
 
 #include <string>
+#include <boost/algorithm/string.hpp>
+#include "include/assert.h"
 
 #include "include/types.h"
 #include "rgw_common.h"
@@ -215,6 +217,8 @@ struct RGWUserAdminOpState {
     if (email.empty())
       return;
 
+    /* always lowercase email address */
+    boost::algorithm::to_lower(email);
     user_email = email;
     user_email_specified = true;
   }