Cockatrice/servatrice
Zach H 46cdbac830
[Servatrice] Match trusted_sources by address, not substring (#7582)
trusted_sources was checked with QString::contains. A dual-stack listener
reports a local proxy as ::ffff:127.0.0.1, which never matches the default
"127.0.0.1,::1". Behind nginx the forwarded client IP header was then
ignored, every websocket user shared the proxy's address, and logins
failed with "too many concurrent connections" once max_users_per_address
was reached.

Add isTrustedSource(), which parses each entry as a QHostAddress and
compares exact addresses with IPv4-mapped addresses normalized, and use it
at all four call sites. The ban command also read server/trusted_sources
instead of the documented security/trusted_sources; it now uses the same
getter. Entries that are not IP addresses are logged at startup since they
no longer match anything.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 16:50:04 -04:00
..
docker Docker-compose setup for Servatrice (#3887) 2020-03-16 21:40:58 -04:00
migrations [Security] Add challenge-response auth with scrypt verifiers and stop storing plaintext passwords (#7193) 2026-10-16 22:52:26 +02:00
mysql-storage Docker-Compose support for Windows (#3974) 2020-05-08 15:22:39 -04:00
resources Update macOS Monterey app icon (#4805) 2023-08-06 17:46:03 -04:00
scripts Add Discord account registration monitor (#7013) 2026-06-21 01:09:57 -04:00
src [Servatrice] Match trusted_sources by address, not substring (#7582) 2026-10-18 16:50:04 -04:00
check_schema_version.sh update format.sh (#6240) 2025-11-07 15:00:39 +01:00
CMakeLists.txt [Servatrice] Match trusted_sources by address, not substring (#7582) 2026-10-18 16:50:04 -04: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 [Servatrice] Match trusted_sources by address, not substring (#7582) 2026-10-18 16:50:04 -04: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 [Security] Add challenge-response auth with scrypt verifiers and stop storing plaintext passwords (#7193) 2026-10-16 22:52:26 +02:00