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_shun.cpp | |
parent | 60ae49b62a371791ebbd9e4b131e33b857873f06 (diff) |
Only parse valid durations, don't treat invalid multipliers as seconds (#1538)
Diffstat (limited to 'src/modules/m_shun.cpp')
-rw-r--r-- | src/modules/m_shun.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 91933e7c4..e4fb2c11d 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -90,7 +90,11 @@ class CommandShun : public Command std::string expr; if (parameters.size() > 2) { - duration = InspIRCd::Duration(parameters[1]); + if (!InspIRCd::Duration(parameters[1], duration)) + { + user->WriteNotice("*** Invalid duration for SHUN"); + return CMD_FAILURE; + } expr = parameters[2]; } else |