Cockatrice/servatrice
Kevin Boxhoorn 0b7f4c134c Disallow usernames that contain certain words and RegExp (#2200)
* Add `disallowedwords` setting and perform check

Check if any of the words in `disallowedwords` are contained in the username. If
so, return false like other checks.

NOTE: Needs testing for advanced bugs.

* Remove "administrator" from `disallowedwords`

"administrator" contains "admin" anyway, so it is not needed.

* Add error message if username contains a disallowed word

* Add `disallowedregexp` setting and perform check

Check if each expression in `disallowedregexp` exactly matches the username. If
so, return false.

TODO: Add specific error to dialog in `window_main.cpp`.

* Add error message for username matching RegExp

* Fix indentation

* Compile `disallowedregexp` into a QList upon initialization

Reduces system load with each registration request.

* Clean up `isUsernameValid` function

* Fix indentation

* Add backwards compatibility to client

Client can accept either 7 or 9 rules to maintain compatibility with older
versions of server.

* Add examples and warnings to `servatrice.ini`
2016-10-17 12:24:42 +02:00
..
migrations fix #2118 (#2119) 2016-08-02 21:58:56 -04:00
resources svg+png updates 2015-04-28 16:06:36 +02:00
scripts Update maint script files 2016-07-21 10:38:46 -04:00
src Disallow usernames that contain certain words and RegExp (#2200) 2016-10-17 12:24:42 +02:00
check_schema_version.sh Add script to validate schema changes. 2015-12-13 10:47:39 +01:00
CMakeLists.txt Implementation of websockets in servatrice and test js client 2016-06-26 19:38:53 +02:00
servatrice.desktop Servatrice: open in a terminal window when started from the menu 2014-10-11 13:38:07 +02:00
servatrice.ini.example Disallow usernames that contain certain words and RegExp (#2200) 2016-10-17 12:24:42 +02:00
servatrice.qrc Renamed resources 2014-10-07 16:49:40 +02:00
servatrice.rc Servatrice logo 2014-10-06 21:04:37 +02:00
servatrice.sql fix #2118 (#2119) 2016-08-02 21:58:56 -04:00