mirror of
https://github.com/znc/znc.git
synced 2026-05-05 04:52:31 +02:00
Don't write unexpected newlines to znc.conf
This patch fixes the same bug as the last commit and also makes sure that similar bugs can't happen again. Thanks to cnu for finding and reporting this bug. Thanks to kroimon for patch review. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1396 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
5
User.cpp
5
User.cpp
@@ -554,11 +554,12 @@ bool CUser::PrintLine(CFile& File, const CString& sName, const CString& sValue)
|
||||
return false;
|
||||
}
|
||||
|
||||
return File.Write("\t" + sName + " = " + sValue + "\n");
|
||||
return File.Write("\t" + sName.FirstLine()
|
||||
+ " = " + sValue.FirstLine() + "\n");
|
||||
}
|
||||
|
||||
bool CUser::WriteConfig(CFile& File) {
|
||||
File.Write("<User " + GetUserName() + ">\n");
|
||||
File.Write("<User " + GetUserName().FirstLine() + ">\n");
|
||||
|
||||
if (IsPassHashed()) {
|
||||
if (m_sPassSalt.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user