]> 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)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Mon, 1 Aug 2016 06:32:16 +0000 (12:02 +0530)
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 6335fb6f2ff28e719e99dde8e3e40e116b4f04d2..c17e54b9715ab22de6e815f735987be24c11eb26 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"
@@ -244,6 +246,8 @@ struct RGWUserAdminOpState {
     if (email.empty())
       return;
 
+    /* always lowercase email address */
+    boost::algorithm::to_lower(email);
     user_email = email;
     user_email_specified = true;
   }