Commit 27e1b9d9 authored by Ghislain MARY's avatar Ghislain MARY

Fix handling of username with space.

parent c61d849e
......@@ -174,7 +174,7 @@ void FileAuthDb::sync() {
// if user with space, replace %20 by space
string user_ref;
user_ref.resize(user.size());
user_ref.reserve(user.size());
url_unescape(&user_ref[0], user.c_str());
if (!ss.eof()) {
// TODO read userid with space
......
......@@ -92,8 +92,7 @@ void AuthDbBackend::declareConfig(GenericStruct *mc) {
string AuthDbBackend::createPasswordKey(const string &user, const string &auth_username) {
ostringstream key;
string unescapedUsername;
unescapedUsername.resize(auth_username.size());
unescapedUsername.reserve(auth_username.size());
url_unescape(&unescapedUsername[0], auth_username.c_str());
key << user << "#" << unescapedUsername;
return key.str();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment