mirror of
https://github.com/znc/znc.git
synced 2026-05-09 14:54:53 +02:00
Make CUser::PrintLine() a little more readable and fix the return value
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1464 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -581,8 +581,12 @@ bool CUser::PrintLine(CFile& File, const CString& sName, const CString& sValue)
|
||||
return false;
|
||||
}
|
||||
|
||||
return File.Write("\t" + sName.FirstLine()
|
||||
+ " = " + sValue.FirstLine() + "\n");
|
||||
// FirstLine() so that no one can inject new lines to the config if he
|
||||
// manages to add "\n" to e.g. sValue.
|
||||
CString sLine = "\t" + sName.FirstLine() + " = " + sValue.FirstLine() + "\n";
|
||||
if (File.Write(sLine) <= 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CUser::WriteConfig(CFile& File) {
|
||||
|
||||
Reference in New Issue
Block a user