From 135fc575bc260a5ec0396140f18287bdb15b23c2 Mon Sep 17 00:00:00 2001 From: Iris Morelle Date: Sun, 6 May 2018 05:20:03 -0300 Subject: [PATCH] fuh: Add NOTE on the status of glob bans [ci skip] (cherry-picked from commit c0f160b35150d1893b77da43de3279dfe54fc10c) --- src/server/forum_user_handler.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/forum_user_handler.cpp b/src/server/forum_user_handler.cpp index 43ad2cb66767..10f33b203c55 100644 --- a/src/server/forum_user_handler.cpp +++ b/src/server/forum_user_handler.cpp @@ -174,6 +174,14 @@ void fuh::set_is_moderator(const std::string& name, const bool& is_moderator) { fuh::BAN_TYPE fuh::user_is_banned(const std::string& name, const std::string& addr) { + // + // NOTE: glob IP and email address bans are NOT supported yet since they + // require a different kind of query that isn't supported by our + // prepared SQL statement API right now. However, they are basically + // never used on forums.wesnoth.org, so this shouldn't be a problem + // for the time being. + // + if(!addr.empty() && prepared_statement("SELECT 1 FROM `" + db_banlist_table_ + "` WHERE UPPER(ban_ip) = UPPER(?) AND ban_exclude = 0", addr)) { LOG_UH << "User '" << name << "' ip " << addr << " banned by IP address\n"; return BAN_IP;