浏览代码

HPCC-16816 Copy original password to cached secuser

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
wangkx 8 年之前
父节点
当前提交
40a7b92543
共有 1 个文件被更改,包括 2 次插入1 次删除
  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