From 4a62fca388eaaf4cbdf72dbbee928009d89da35d Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 13 Jul 2008 16:25:53 +0000 Subject: [PATCH] Fix CUser::Clone() to work with salted passwords git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1128 726aef4b-f618-498e-8847-2d620e286838 --- User.cpp | 3 ++- User.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/User.cpp b/User.cpp index c3f5d36b..a98f5e71 100644 --- a/User.cpp +++ b/User.cpp @@ -287,7 +287,7 @@ bool CUser::Clone(const CUser& User, CString& sErrorRet, bool bCloneChans) { } if (!User.GetPass().empty()) { - SetPass(User.GetPass(), User.IsPassHashed()); + SetPass(User.GetPass(), User.IsPassHashed(), User.GetPassSalt()); } SetNick(User.GetNick(false)); @@ -1096,6 +1096,7 @@ const CString& CUser::GetRealName() const { return m_sRealName.empty() ? m_sUser const CString& CUser::GetVHost() const { return m_sVHost; } const CString& CUser::GetPass() const { return m_sPass; } bool CUser::IsPassHashed() const { return m_bPassHashed; } +const CString& CUser::GetPassSalt() const { return m_sPassSalt; } bool CUser::ConnectPaused() { if (!m_uConnectTime) { diff --git a/User.h b/User.h index ae4d1e6c..4b7e30f4 100644 --- a/User.h +++ b/User.h @@ -159,6 +159,7 @@ public: const CString& GetVHost() const; const CString& GetPass() const; bool IsPassHashed() const; + const CString& GetPassSalt() const; const set& GetAllowedHosts() const; const CString& GetTimestampFormat() const; bool GetTimestampAppend() const;