mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-24 02:03:52 +03:00
parent
6c01f40a26
commit
8b0503a500
@ -20,6 +20,7 @@
|
||||
#include "NebulaUtil.h"
|
||||
#include "PoolObjectAuth.h"
|
||||
#include "Nebula.h"
|
||||
#include <regex>
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
@ -206,6 +207,13 @@ void AuthManager::authenticate_action(AuthRequest * ar)
|
||||
goto error_driver;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Sanitize the login - remove leading and trailing spaces
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
ar->username = regex_replace(ar->username, regex("^(%20|%09|%0A|%0D)+"), "");
|
||||
ar->username = regex_replace(ar->username, regex("(%20|%09|%0A|%0D)+$"), "");
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Queue the request
|
||||
// ------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user