Cockatrice/servatrice/src
Lukas Brübach 997eee835e [DeckSync] Match server rows by identity and hash the whole deck
Sync keyed local files to server rows by path, but the server names a row
after the deck, not after the file, so any deck whose file name and deck name
differ uploaded again on every run. A second pass then brought the server copy
back as an extra local file.

- Match by the sidecar's row id, then guid, then content, and only then by the
  server path, so renaming either side no longer duplicates a deck.
- Key the server tree by row id: the server allows several rows with the same
  name in one folder, and keying by path silently dropped all but one.
- Stop discarding rows whose name contains '/' ("U/W Control"). They stay
  matchable, and only the download file name is sanitised.
- Build the download path from the folder plus a sanitised row name, including
  every folder segment, so a hostile server name cannot escape the deck folder.
- Download a colliding server row under a unique name and count it, instead of
  skipping it without a trace.
- Hash the whole deck instead of the card hash: SHA-1 over the native deck
  string covers name, printings, banner, tokens and sideboard plans. The client
  and the server hash the exact bytes they exchange, so both agree.

Adds deck_content_hash_test for the client/server hashing invariant and for the
name-only change the card hash cannot see.
2026-11-07 23:49:18 +01:00
..
smtp [SMTP] Add reliable email delivery with retry and database-backed queue (#7240) 2026-10-11 20:59:32 +02:00
deck_tag_serialization.h [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
email_parser.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
email_parser.h Fix #4903: Parse Email Addresses whenever used (#4932) 2023-12-09 00:52:47 -05:00
event_loop_watchdog.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
event_loop_watchdog.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
forwarded_address.cpp [Server] Parse the rightmost address from forwarded header lists (#7586) 2026-10-18 16:53:55 -04:00
forwarded_address.h [Server] Parse the rightmost address from forwarded header lists (#7586) 2026-10-18 16:53:55 -04:00
isl_interface.cpp [Servatrice] Use compile-time checked connections (#7631) 2026-11-02 07:13:21 +01:00
isl_interface.h [Servatrice] Relay room channel messages over ISL (#7480) 2026-10-16 22:46:40 +02:00
main.cpp [Servatrice] Fail loudly when startup initialization fails (#7602) 2026-10-31 19:02:49 +01:00
main.h Refactor servatrice email send 2015-07-25 18:48:34 +02:00
metrics_registry.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
metrics_registry.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
ratelimiter.cpp [Server] Inform client of login/registration rate limit timeout (#7468) 2026-10-16 05:47:43 +02:00
ratelimiter.h [Server] Inform client of login/registration rate limit timeout (#7468) 2026-10-16 05:47:43 +02:00
servatrice.cpp [Server] Persist and serve deck sync fields + version rows 2026-11-07 23:24:34 +01:00
servatrice.h [Server] Persist and serve deck sync fields + version rows 2026-11-07 23:24:34 +01:00
servatrice_connection_pool.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
servatrice_connection_pool.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
servatrice_database_interface.cpp [Logs] Browse room history without filters with paginated infinite scroll (#7531) 2026-11-02 07:36:49 +01:00
servatrice_database_interface.h [Server] Deck sync identity: schema v41 + proto guid/hash fields 2026-11-07 23:24:32 +01:00
server_logger.cpp [CardDB] Break the CardInfo <-> CardSet cycle on reload (#7645) 2026-10-31 19:37:15 +01:00
server_logger.h [CardDB] Break the CardInfo <-> CardSet cycle on reload (#7645) 2026-10-31 19:37:15 +01:00
serversocketinterface.cpp [DeckSync] Match server rows by identity and hash the whole deck 2026-11-07 23:49:18 +01:00
serversocketinterface.h [Server] Persist and serve deck sync fields + version rows 2026-11-07 23:24:34 +01:00
settingscache.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
settingscache.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
signalhandler.cpp [Servatrice] Fail loudly when startup initialization fails (#7602) 2026-10-31 19:02:49 +01:00
signalhandler.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
smtpclient.cpp [Servatrice] Use compile-time checked connections (#7631) 2026-11-02 07:13:21 +01:00
smtpclient.h [SMTP] Add reliable email delivery with retry and database-backed queue (#7240) 2026-10-11 20:59:32 +02:00
trusted_sources.cpp [Servatrice] Match trusted_sources by address, not substring (#7582) 2026-10-18 16:50:04 -04:00
trusted_sources.h [Servatrice] Match trusted_sources by address, not substring (#7582) 2026-10-18 16:50:04 -04:00