mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-26 00:08:30 -04:00
Use dbEscapeString on username retrieved from jwt to prevent SQL injection
This commit is contained in:
1 parent
119e4e6756
commit
decf3e307b
1 file changed
+1
-1
+1
-1
@@ -176,7 +176,7 @@ User *zmLoadTokenUser(const std::string &jwt_token_str, bool use_remote_addr) {
|
||||
Debug(1, "Inside zmLoadTokenUser, formed key=%s", key.c_str());
|
||||
|
||||
std::pair<std::string, unsigned int> ans = verifyToken(jwt_token_str, key);
|
||||
std::string username = ans.first;
|
||||
std::string username = zmDbEscapeString(ans.first);
|
||||
unsigned int iat = ans.second;
|
||||
Debug(1, "retrieved user '%s' from token", username.c_str());
|
||||
|
||||
|
||||
Reference in new issue
Block a user