Explorar o código

HPCC-16816 Copy original password to cached secuser

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
wangkx %!s(int64=8) %!d(string=hai) anos
pai
achega
40a7b92543
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      system/security/shared/caching.cpp

+ 2 - 1
system/security/shared/caching.cpp

@@ -367,8 +367,9 @@ bool CPermissionsCache::lookup(ISecUser& sec_user)
                     DBGLOG("CACHE: CPermissionsCache Found validated user %s", username);
 #endif
                     // Copy cached user to the sec_user structure, but still keep the original clear text password.
+                    StringAttr originalPW(pw);
                     user->queryUser()->copyTo(sec_user);
-                    sec_user.credentials().setPassword(pw);
+                    sec_user.credentials().setPassword(originalPW.get());
                     return true;
                 }
                 else