Commit Graph

39 Commits

Author SHA1 Message Date
Georges-Antoine Assi
45c8a1057f fix(metadata): guard every scene id parse against the int() digit limit
CPython's int() raises past 4300 digits. The bare-digit branch of
scene_id_or_none already caught that, but the URL parsers, the filename
tag extractors and the Pouet 302 Location parser all called int() on an
unbounded (\d+) capture, so a pasted URL or a scanned filename carrying a
long digit run surfaced as a 500.

Promote pouet_handler's private _int_or_none to utils.int_or_none, next
to valid_youtube_id, and route every scene id conversion through it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 21:23:49 -04:00
Georges-Antoine Assi
f353f3c1fe fix(metadata): cap every provider read and validate embedded video ids
Move the response cap onto MetadataHandler as _fetch_capped and route
Demozoo, Pouet, and CSDb through it. Only CSDb was capped before, while
Demozoo and Pouet read an unbounded body into memory before decoding it.
Pouet's title search now streams too: an ambiguous title answers 200 with
HTML we never parse, but the body was still being buffered.

Validate youtube_video_id where it is read rather than where Demozoo
parses it. The four metadata blobs it reads from are writable through the
raw_*_metadata form fields, so the id reaching the embed URL never had to
come from a provider, and IGDB and LaunchBox never checked it at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-30 21:15:50 -04:00
Georges-Antoine Assi
ad5525c484 [ROMM-2547] Flashpoint scrape by ID 2025-10-18 22:18:42 -04:00
Michael Manganiello
7dc7eea34d feat: Initial Sentry support
This change initializes the Sentry SDK, which enables error tracking
when the `SENTRY_DSN` environment variable is set.

Drop-in alternatives to Sentry are also supported, like GlitchTip.
2024-12-27 17:03:45 -03:00
Georges-Antoine Assi
7635bbeac2 run trunk fixes 2024-05-24 16:59:54 -04:00
Georges-Antoine Assi
f73a6f48b9 more refactoring 2024-05-23 21:13:17 -04:00
Georges-Antoine Assi
6d3bcff4f1 move files to utils 2024-04-03 22:33:41 -04:00
Zurdi
4b9e76f550 backend structure refactor 2024-01-12 23:44:27 +01:00
Zurdi
06d041fa30 catch timeout from check new version 2024-01-10 15:17:51 +01:00
Zurdi
5b51bb150f generated new types 2024-01-09 21:40:19 +01:00
Georges-Antoine Assi
5762270f62 Merge branch 'master' into romm-55 2024-01-09 13:06:51 -05:00
Zurdi
cda45e6d9c Merge remote-tracking branch 'origin/master' 2024-01-09 16:26:43 +01:00
Zurdi
eea7e41940 docstrings added to endpoints + organized imports + formatted code 2024-01-09 16:22:31 +01:00
Georges-Antoine Assi
6d5ef25c17 Hotfix excluding files with no extensions 2024-01-09 09:39:51 -05:00
Zurdi
1641e6bd16 timeout to check new version added 2024-01-09 09:57:29 +01:00
Zurdi
4dd35e9e40 check if new version is available 2024-01-09 01:15:17 +01:00
Georges-Antoine Assi
3767401075 Merge branch 'master' into romm-55 2023-12-28 13:46:08 -05:00
Georges-Antoine Assi
c6566bb89c Merge branch 'master' into romm-55 2023-12-28 13:17:46 -05:00
Zurdi
070b23ba23 show configured custom platforms in the settings section 2023-12-27 13:10:50 +01:00
Zurdi
808279b2cd get branch_name and version from backend 2023-12-13 10:43:00 +01:00
Georges-Antoine Assi
43816783a7 Hotfix subtag parsing 2023-12-12 08:26:18 -08:00
Georges-Antoine Assi
08fbae26f7 Merge branch 'master' into romm-55 2023-12-06 21:18:40 -05:00
Georges-Antoine Assi
be0b36c439 Multi lang and multi region support 2023-12-03 11:27:35 -05:00
Georges-Antoine Assi
f560d03b86 Get saves and states loading 2023-11-14 00:00:33 -05:00
Georges-Antoine Assi
f7df912e20 Finish scanning for saves/states 2023-11-13 13:02:54 -05:00
Georges-Antoine Assi
1967879f0c Models for saves and states + scannig 2023-11-13 00:09:38 -05:00
Georges-Antoine Assi
a3a1eb9323 Fix tests 2023-11-04 23:39:41 -04:00
Georges-Antoine Assi
015e5927d6 Less extensive multi extension regex 2023-11-04 23:12:40 -04:00
Georges-Antoine Assi
197f26dabc Use the same regex in file 2023-09-21 20:17:30 -04:00
Georges-Antoine Assi
3bda51c29d Fix tests + regex issue 2023-09-21 10:39:39 -04:00
Georges-Antoine Assi
a9c9d658bb Aggressive removal of file extensions and tags 2023-09-21 09:30:02 -04:00
Georges-Antoine Assi
d830ea531d Add docs for running tests 2023-08-02 09:48:20 -04:00
Georges-Antoine Assi
355d3c7f35 Add tests for utils init 2023-08-01 10:14:06 -04:00
zurdi
753ff6f6f4 regions ordered and formatted 2023-07-31 13:39:12 +02:00
zurdi
fa4ba50ea3 improved region tag detection when using 'reg-[shortcode]' 2023-07-31 13:15:30 +02:00
Georges-Antoine Assi
324c61dfb0 Even more robust tag detection 2023-07-29 11:04:12 -04:00
Georges-Antoine Assi
6f8fc6afed Improved tag detection and support 2023-07-28 19:45:58 -04:00
Georges-Antoine Assi
99afbc8f3f Refactor socket connections 2023-05-18 17:34:45 -04:00
Georges-Antoine Assi
917dbc3295 Rewrite dev setup, switch to poetry and refactor folder strucutre 2023-05-08 19:01:21 -04:00