diff options
author | linuxdaemon <linuxdaemon@users.noreply.github.com> | 2018-12-21 12:37:22 -0600 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-12-21 19:37:22 +0100 |
commit | 7530285740c2db1bc4457859b0d5f2436e0ed113 (patch) | |
tree | 89635613725a1b7ad6e262d7e3035a518d42e8d2 /src/modules/m_dccallow.cpp | |
parent | 60ae49b62a371791ebbd9e4b131e33b857873f06 (diff) |
Only parse valid durations, don't treat invalid multipliers as seconds (#1538)
Diffstat (limited to 'src/modules/m_dccallow.cpp')
-rw-r--r-- | src/modules/m_dccallow.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 85f9d20d0..d9e26d28f 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -219,7 +219,11 @@ class CommandDccallow : public Command } else { - length = InspIRCd::Duration(parameters[1]); + if (!InspIRCd::Duration(parameters[1], length)) + { + user->WriteNotice("*** Invalid duration for DCC allow"); + return CMD_FAILURE; + } } if (!InspIRCd::IsValidMask(mask)) |