91 Commits (master)

Author SHA1 Message Date
Frederico Santos 8e20875453
feat: Add admin Discord link endpoint (#49)
* feat: Add admin Discord link endpoint

* feat: Add Discord Guild ID flag to server configuration

* feat: Add logging for Discord ID addition in admin Discord link endpoint

* chore: Update variable name for Discord guild ID in account package

* chore: Add logging for Discord ID addition in admin Discord link endpoint

* chore: Add admin Discord link endpoint

* chore: Add logging for Discord ID addition in admin Discord link endpoint

* chore: Remove unnecessary code in handleAdminDiscordLink function

* chore: Update logging format in handleAdminDiscordLink function

* chore: Refactor handleAdminDiscordLink function for improved logging

* chore: Update Discord Bot Token and Discord Guild ID flags in server configuration

* chore: Refactor handleAccountInfo function for improved readability and error handling

* chore: Update server configuration flags for Discord Bot Token and Guild ID

* Refactor handleAdminDiscordLink function for improved error handling and logging

* feat: Add "Helper" role to Discord admin check for enhanced access control
5 days ago
Pancakes 8ac507d2d5
Don't use best compression encoder level for zstandard 4 weeks ago
Pancakes a7d5f60d5f
Add new compression code 1 month ago
Frederico Santos fa57f5997f
Added support for Discord OAuth2 (#25)
* Need a login check

* chore: Add Discord OAuth2 authentication endpoint

chore: Update dependencies and clean up code

chore: Update dependencies, add Discord OAuth2 authentication endpoint, and clean up code

chore: Update dependencies, add Google OAuth2 authentication endpoint, and clean up code

Code clean up

uniqueness on external account id

chore: Add Discord and Google OAuth2 authentication endpoints, and update dependencies

code review fixes

* chore: Update prodHandler to use clienturl flag for Access-Control-Allow-Origin

* chore: Refactor FetchDiscordIdByUsername and FetchGoogleIdByUsername to handle null values

* chore: Set secure and same-site attributes for session cookie

* chore: Set session cookie expiration to 3 months

* Update callback URL for Oauth2 client in docker-compose and rogueserver.go

* Update callback URL for Oauth2 client in docker-compose and rogueserver.go

---------

Co-authored-by: Matthew Olker <matthew.olker@gmail.com>
2 months ago
Frederico Santos 4cac6b6ce8
Update SaveData to handle session and system out of date overwrites (#43)
* chore: Update savedata API to handle session out of date errors

* chore: Handle session out of date errors in savedata API

* chore: Handle session out of date errors in savedata API

* chore: Update savedata API to handle session out of date errors
3 months ago
Pancakes dd00d90211
Remove voucher compensation code 3 months ago
Pancakes 048db67609
Remove timestamp guard 3 months ago
Pancakes 9efd1b751a
Update StoreSystemSaveData 3 months ago
Frederico Santos 52c5c9ee6c
Reject saves with 2 days difference (#29)
* Reject saves with 2 days difference

* improved timestamp checks

* chore: Refactor timestamp checks for saving system data

* Refactor timestamp checks for saving system data
3 months ago
Frederico Santos 87e8f00cd6
Refactor saving session and system data to prevent saving older saves on previous waves (#26)
* chore: Refactor saving session data to prevent saving older sessions

* chore: Refactor saving system data to prevent saving older sessions

* Refactor saving session and system data to prevent saving older versions
4 months ago
maru 476e667572
More cleanup 4 months ago
maru c76746ad35
Replace REPLACE INTO usage 4 months ago
maru 3489ae91bf
Change max connections code again 4 months ago
maru 15a32c0e23
Various cleanup 4 months ago
maru 4cc2d3431c
Set conns value to 128 4 months ago
maru 1441d47694
Remove legacy save migration code 4 months ago
maru 7bfd9dfba7
Fix code 4 months ago
maru fc458fad73
Revert "Remove anti cheat"
This reverts commit 512a24e5c3.
4 months ago
Flashfyre df92ff8b6f Add last activity update on verify 4 months ago
Up f31f130c14
also check for empty 4 months ago
Up c17c583321
update active session if none is found 4 months ago
Up a063b1740c
add missing foreign key declarations 4 months ago
Up e2efcd550c
fix faulty sql query 4 months ago
Up 834d1e62a0
add foreign key constraint on client session table 4 months ago
Up c0aade2e65
simplify ID handling 4 months ago
Up 436fce8759
add client session ID tokens 4 months ago
Up 5d6bfe0c22
add accounts activity index 4 months ago
Krystian Chmura 03865f9b94
run golangci-lint in CI 4 months ago
maru 36f353b8a6
Clean up db.go 4 months ago
maru 5656fb96d1
Use log.Fatal isntead of panic 4 months ago
Flashfyre 2704e64e38 Add newclear endpoint 4 months ago
maru 693663103b
Run formatter on files 4 months ago
maru b5e8094039
Don't return INVALID on seed-related function error 4 months ago
Up 3ed5f41d58
make server automatically create DB schema if not exists (#5)
* add default values for CLI args

* add development docker compose file

* prevent crash if userdata dir does not exist

* accounts, acccountStats

* account stats and create db indices

* compensations and daily runs

* ensure uniqueness of daily seed

* start on port 8001 by default for client parity

* make generated schema match production

* sort imports
4 months ago
maru e4de7c2391
Update database limiting code more 4 months ago
maru de0bd74dc2
Update database limits 4 months ago
maru 59ea469fb6
Don't import legacy saves if system exists in database 4 months ago
maru 4971ad9d42
Add new database limits 4 months ago
maru 7dbcb18ebf
Use INSERT instead of REPLACE for savedata storage functions 4 months ago
maru 6cb179b553
Clean up savedata.go 4 months ago
Up 0d6539a87b
continue on existing save (#3)
* long blob

* fix continue

* one slot only?

* fallback if there is no slot data yet

* Revert "one slot only?"

This reverts commit 20997e9cd8.
4 months ago
Up 1f95f7c042
hotfix: move save data to DB (#2)
* start reading save data from DB

* finish migration code

* remove leftover dir creation

* fix import cycle

* remove more dir creation

* update gitignore

* fix pk

* better table creation

* use REPLACE INTO

* fix typo
4 months ago
maru a087234aa8
Replace usernameFromRequest 5 months ago
maru 808a9e6c7d
Remove redundant error check 5 months ago
Flashfyre 3553891e6e Temporarily remove session expiration check 5 months ago
Flashfyre e19104c86a Prevent initial out of date message on register 5 months ago
maru 512a24e5c3
Remove anti cheat 5 months ago
maru 786e947e09
Change 'banned' to 'limited 5 months ago
maru 8481626193
Relicense under AGPL 5 months ago
maru 235fb9c91c
Add copyright notice to files 5 months ago