mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
7
User.cpp
7
User.cpp
@@ -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