[Commits] [wesnoth/wesnoth] f3b87a: campaignd: Tiny variable refactoring
GitHub
noreply at github.com
Wed Jun 4 17:54:00 UTC 2014
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: f3b87a936683b9fa80d24fcfe6b5d40641bb9240
https://github.com/wesnoth/wesnoth/commit/f3b87a936683b9fa80d24fcfe6b5d40641bb9240
Author: Ignacio R. Morelle <shadowm at wesnoth.org>
Date: 2014-06-04 (Wed, 04 Jun 2014)
Changed paths:
M src/campaign_server/campaign_server.cpp
Log Message:
-----------
campaignd: Tiny variable refactoring
Commit: 344fa792c2b28df3e47e80af7d5898230a4e1b8d
https://github.com/wesnoth/wesnoth/commit/344fa792c2b28df3e47e80af7d5898230a4e1b8d
Author: Ignacio R. Morelle <shadowm at wesnoth.org>
Date: 2014-06-04 (Wed, 04 Jun 2014)
Changed paths:
M changelog
M src/CMakeLists.txt
M src/SConscript
A src/campaign_server/blacklist.cpp
A src/campaign_server/blacklist.hpp
M src/campaign_server/campaign_server.cpp
Log Message:
-----------
campaignd: Quick-and-dirty implementation of upload-time blacklisting
A path to a blacklist WML file may be provided in the campaignd
configuration file (server.cfg). The BL file, in turn, may contain
attributes for comma-delimited lists of wildcard patterns, accepting
shell-style '*' and '?', by leveraging utils::wildcard_string_match()'s
functionality.
The following lists of patterns are recognized at this time:
ip=<numeric IPv4 address masks>
email=<add-on author email masks>
name=<add-on id/name masks>
title=<add-on title masks>
author=<add-on author masks>
description=<add-on description masks>
Currently, the IP address mask list also takes '*' and '?' wildcards. My
intention is to use CIDR subnet masks instead of or in addition to this.
The blacklist WML file is only read by campaignd once at startup and
it's never written to, thus allowing to preserve any WML comment lines
that may be included in the file by admins for convenience.
The IP, email, name, title, author, and description of a (new or
existing) uploaded add-on are matched against the blacklist in that
order. If the add-on matches, the upload is aborted and the user is
shown a generic message in English, just like with every other possible
campaignd-side error (on the plus side, this means it can be backported
to 1.12).
All matches (except for IP matches, which only contain digits and
punctuation) are done case-insensitively.
Because of campaignd protocol limitations, the upload is only checked
and aborted after the client has already uploaded a weighty WML document
including the add-on archive. Such is life, I guess.
Compare: https://github.com/wesnoth/wesnoth/compare/e6ebc74ef2e1...344fa792c2b2
More information about the Commits
mailing list