Browse Source

HPCC-16816 Copy original password to cached secuser

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
wangkx 8 years ago
parent
commit
40a7b92543
1 changed files with 2 additions and 1 deletions
  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