Refuse harder and print a debug warning in case some bad code
tries to write invalid lines to the config file. Patch by DGandalf, thanks. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1962 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
1 parent
bb567c51de
commit
837f1f62a8
2 files changed
+7
-2
No files matched your search
@@ -602,8 +602,13 @@ bool CUser::DelChan(const CString& sName) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CUser::PrintLine(CFile& File, const CString& sName, const CString& sValue) {
|
||||
bool CUser::PrintLine(CFile& File, CString sName, CString sValue) {
|
||||
sName.Trim();
|
||||
sValue.Trim();
|
||||
|
||||
if (sName.empty() || sValue.empty()) {
|
||||
DEBUG("Refused writing an invalid line to a user config. ["
|
||||
<< sName << "] [" << sValue << "]");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user