Commit Graph

33 Commits

Author SHA1 Message Date
Whykioh a60d7bf69f Fix login lockout message being silently overridden
UserController::login() always echoed a generic "wrong credentials"
message on failure, discarding whatever User::login() returned - so a
locked-out account got the same message as a plain typo, with no way
to tell the user to wait instead of retrying immediately.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-12 18:21:49 +02:00
Whykioh 42a388cbe1 Harden for public launch: rate limiting, CORS, error display, Gitea webhook sig
- User::login() locks an account for 15 min after 5 failed attempts
- CORS now restricted to an explicit origin whitelist instead of *
- display_errors disabled in production (errors still logged server-side)
- webhook.php now checks Gitea's actual signature header (X-Gitea-Signature,
  raw hex) instead of GitHub's format, which never matched on this Gitea instance

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-12 17:53:28 +02:00
Whykioh 4c61b7f276 Fix crash bugs and secure webhook/TMDB key
- Add missing MovieController::remove/markWatched (routes called undefined methods)
- Fix linkPartner(): commit() was unreachable after an early return, so partner
  linking was never actually persisted in the DB
- Add missing removeMovie/markWatched functions in app.js
- webhook.php now verifies a GitHub HMAC signature before running git reset --hard
- Move TMDB API key server-side via a new TmdbController proxy (tmdb-search/tmdb-details)
  instead of exposing it in client-side JS

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-12 16:54:40 +02:00
Whykioh 7207e8afb7 aze 2026-07-12 16:27:06 +02:00
Whykioh d15aea79e8 ae 2026-07-12 16:26:09 +02:00
Whykioh 9dd83a1b46 ssf 2026-07-12 16:23:49 +02:00
Whykioh f8a940e8f7 s 2026-07-12 16:21:33 +02:00
Whykioh f3b795a35d à ça de me faire interner 2026-07-12 16:17:05 +02:00
Whykioh fca5df9d06 Fix bad sql connexion 2026-07-12 16:12:29 +02:00
Whykioh c74140aaad Fix unlink method 2026-07-12 16:10:25 +02:00
Whykioh dd32a2dd12 Fix bad sql connexion 2026-07-12 16:01:36 +02:00
Whykioh be73ed60ad Fix link function 2026-07-12 15:54:48 +02:00
Whykioh 63556b5774 Fix unlink function 2026-07-12 15:53:44 +02:00
Whykioh 77328f2908 Fix common movie list request 2026-07-12 15:36:08 +02:00
Whykioh 92e8bf9cdc Fix bad sql request 2026-07-11 20:29:14 +02:00
Whykioh 72d563416b Add Remove & Mark watched movie 2026-07-11 14:08:44 +02:00
Whykioh 535fe6041b Add auto couple movie 2026-07-11 14:02:26 +02:00
Whykioh 53a24326c8 again 2026-07-11 13:57:32 +02:00
Whykioh c5891d4b75 Fix response on login 2026-07-11 13:55:24 +02:00
Whykioh d92a7828a5 Send partner id on login 2026-07-11 13:52:20 +02:00
Whykioh 96f9c6c7f8 Fix function calling 2026-07-11 11:23:31 +02:00
Whykioh b2787a4b8e Add debug logs 2026-07-11 11:17:21 +02:00
Whykioh 7d4de36b10 Fix argument movie list 2026-07-11 11:15:03 +02:00
Whykioh b958d94876 Fix twice issue 2026-07-11 11:13:35 +02:00
Whykioh b44a5a39e1 Fix Movie list 2026-07-11 11:05:47 +02:00
Whykioh d8aa88a8fb Add movies lists 2026-07-11 10:55:59 +02:00
Whykioh 45e5f8d6c6 Fix syntax error 2026-07-11 10:11:31 +02:00
Whykioh 717dbd25b3 Add JWT to enhance security 2026-07-11 09:28:49 +02:00
Whykioh d7328ae9d3 Add pairing between users 2026-07-11 09:20:26 +02:00
Whykioh 81b1b3b835 Add User system 2026-07-11 09:13:29 +02:00
Whykioh 5a6f55b59d Cleanup 2026-07-11 09:00:24 +02:00
Noah ed04d467f7 Webhook autopush 2026-07-11 06:59:46 +00:00
Noah 342ba616ba Initial commit: Structure de base de l'API 2026-07-11 06:37:45 +00:00