From 80e80132826569444e690a177f5bfc5f603fada1 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 17 Apr 2022 11:02:42 +0100 Subject: Remove ValidateParam and rename CanonicalizeParam. There's basically no safe way to handle a malformed list mode sent by a remote server without causing a desync. Its probably for the best if we just only apply validation to locally added list modes entries. --- include/listmode.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'include') diff --git a/include/listmode.h b/include/listmode.h index 7e3b49a86..953957646 100644 --- a/include/listmode.h +++ b/include/listmode.h @@ -156,16 +156,7 @@ public: * @param parameter The parameter that the user specified. * @return True if the parameter is valid; otherwise, false. */ - virtual bool CanonicalizeParam(LocalUser* user, Channel* channel, std::string& parameter); - - /** Validate parameters. - * Overridden by implementing module. - * @param user Source user adding the parameter - * @param channel Channel the parameter is being added to - * @param parameter The actual parameter being added - * @return true if the parameter is valid - */ - virtual bool ValidateParam(User* user, Channel* channel, const std::string& parameter); + virtual bool ValidateParam(LocalUser* user, Channel* channel, std::string& parameter); /** @copydoc ModeHandler::OnParameterMissing */ void OnParameterMissing(User* user, User* dest, Channel* channel) override; -- cgit v1.3.1-10-gc9f91