Commit Graph

62 Commits

Author SHA1 Message Date
Roardom
e1b3384fde refactor: swap fortify for native laravel registration 2026-01-28 01:14:10 +00:00
Roardom
991a61b435 refactor: swap fortify for native laravel email verification 2026-01-27 11:38:25 +00:00
HDVinnie
4e52b9cfc8 remove: lingering vue references 2026-01-01 15:07:59 -05:00
Roardom
38e49bb6b9 fix: can't use ->user() in defered function on logout route
Otherwise it gets changed to null after checking for its nullability.
2025-12-02 09:34:40 +00:00
Roardom
2c09474570 refactor: swap fortify for native laravel functions for password resets
First step in replacing fortify.
2025-12-02 05:22:10 +00:00
HDVinnie
8231af0016 Merge pull request #4964 from Roardom/fix-rate-limit
(Fix) Rate limit by user id instead of ip where applicable
2025-09-17 14:23:32 -04:00
Roardom
8c5f10f5a7 fix: rate limit by user id instead of ip where applicable 2025-09-15 21:44:39 +00:00
Roardom
2a3270e748 update: use cache()->flexible() to improve response times 2025-09-12 01:43:47 +00:00
Roardom
46bfccc8b7 refactor: use enums for auth guards, middleware groups, and rate limits 2025-06-22 20:00:02 +00:00
HDVinnie
99800ce14e Revert "Merge pull request #4774 from Roardom/laravel11-app-structure-3"
This reverts commit d38964cbd7, reversing
changes made to 5c00b12e7c.
2025-06-16 22:41:15 -04:00
Roardom
12b9a30b0c refactor: migrate to laravel 11 app structure 2025-06-13 22:31:20 +00:00
Roardom
9f1e6f3851 refactor: remove unused middlewares 3
I missed some more from the other times (#4744 and #4749). The json check in Authenticate.php has since been upstreamed into laravel, so we don't need to modify that explicitly anymore and can swap it out for laravel's middleware. The RedirectIfAuthenticated middleware now has an option to set the route to redirect to, so we can call that method directly instead of overwriting the method in the middleware. The TrimStrings middleware also now has an option to exclude certain attributes, so we can call that method directly instead of overwriting the method in the middleware.

TrustProxies.php is the only remaining Laravel middleware that is customized, but that can only be replaced with the laravel 11 app structure.
2025-06-09 04:48:44 +00:00
Roardom
ea7c56e0c2 add: igdb rate limiter
Matches tmdb's numbers for now as I can't find anything on igdb about their limits, but it's good to not abuse them regardless.
2025-06-08 02:48:34 +00:00
Roardom
1962ef2c04 update: implement proper tmdb rate limiting
Allows the fetch meta command to work without hitting rate limits on tmdb. Tmdb's rate limit is ~40 per second, but each movie/tv has to send additional http request for each collection, network, company and person, so I figured 2 per second was safe.
2025-05-08 12:01:35 +00:00
HDVinnie
5bf737c2a2 Merge pull request #4648 from Roardom/staff-rate-limit
(Update) increase web rate limit for staff
2025-04-13 16:04:08 -04:00
Roardom
e8306c7833 update: increase web rate limit for staff
Staff often use the site more frequently so are prone to rate limits, but are also fairly well trusted, so double their rate limits.
2025-04-11 07:47:03 +00:00
Roardom
8c1e72a026 update: use separate rate limit for search results
We want search results to update as more characters are typed relatively quickly. Unfortunately this is opposite of our goal of a low rate limit. Separating this route into a separate rate limit solves this issue.
2025-04-10 08:55:39 +00:00
Roardom
321a533316 fix: use separate rate limiter for authenticated images
30 per minute for web is too easy to hit.
2025-03-11 21:26:18 +00:00
Roardom
297b18a082 update: force redirect /index.php/ requests
This was never intended, and was recently discovered when an old site was migrated to UNIT3D and its users had browser bookmarks to https://domain.tld/index.php. Users browsing from this url have all their links generated with the `index.php` included, include the announce urls in their torrents, which isn't great and causes issues with unit3d-announce.
2024-05-26 18:15:54 +00:00
Roardom
b86475a732 add: strict types to all files 2024-05-23 13:58:29 +00:00
HDVinnie
ebc2f205e5 update: rate limiters 2024-03-27 07:18:45 -04:00
Roardom
ad7c220a01 fix: namespace rate limiters 2024-02-08 15:32:27 +00:00
HDVinnie
0ac6bc82a0 fix: rate limiters 2024-01-19 04:18:20 -05:00
HDVinnie
3a9c91f3e3 update: rate limiters 2024-01-19 02:56:26 -05:00
HDVinnie
9fefb517cc fix: typo 2024-01-19 02:43:47 -05:00
HDVinnie
c681c0514c update: overides 2024-01-19 02:40:40 -05:00
HDVinnie
455ebb3d14 update: fortify overide for limiter 2024-01-19 02:11:42 -05:00
Roardom
ee9eab2014 fix: web rate limiter
We need to separate chat with its own route limiter.
2024-01-19 06:29:32 +00:00
HDVinnie
4ce90b163f PHP Style Change (Laravel Pint CI) 2023-10-13 02:31:58 +00:00
HDVinnie
b3f0386149 cleanup: pt.1 2023-10-12 22:30:52 -04:00
Roardom
3289281ce8 add: rate limit for web pages 2023-05-08 08:40:38 +00:00
HDVinnie
472c820f99 update: UNIT3D linting
- github action updated with new ruleset in pint.json
- codebase linted with new ruleset
- contributors can now run `./vendor/bin/pint`
- action workflow will auto correct any lint issues upon commit/opened pull request
2023-02-02 08:02:34 -05:00
HDVinnie
e62c64c3a1 update: rss
- add caching and adjust default rate limiters
2022-09-09 12:44:42 -04:00
HDVinnie
36474677ac update: Route Service Provider 2022-09-01 13:52:00 -04:00
HDVinnie
5d4f850e66 add: rss rate limiting 2022-08-25 18:59:20 -04:00
clandestine8
7816df4f64 update: announce throttling 2022-05-17 23:35:43 -04:00
clandestine8
d84b8e1097 add: announce routing 2022-05-17 19:19:42 -04:00
HDVinnie
d86c16a1c2 fix: route service provider 2022-03-02 03:40:49 -05:00
HDVinnie
794a461726 update: providers 2022-02-28 05:02:14 -05:00
HDVinnie
5b3e50a625 chore: lint 2022-01-19 15:04:11 -05:00
Shift
d36e318d23 Convert optional() to nullsafe operator 2022-01-19 19:51:20 +00:00
HDVinnie
97394c062f chore: adopt type hints 2022-01-07 23:35:33 -05:00
HDVinnie
47c557b0a1 refactor: routes
- register routes using static ::class references instead of strings and remove any namespace prefixes from the RouteServiceProvider. This convention was adopted by default in Laravel 8. Converted controller action strings to array tuples for improved code completion and static analysis.
2021-07-12 21:55:19 -04:00
HDVinnie
d75bbdc665 Apply fixes from StyleCI
[ci skip] [skip ci]
2021-07-13 00:36:19 +00:00
HDVinnie
b5c27ce8cd refactor: convert simple closures to arrow functions 2021-07-12 20:35:41 -04:00
HDVinnie
bd6008a900 performance: pre-slash short named functions
- https://stackoverflow.com/questions/55419673/php7-adding-a-slash-to-all-standard-php-functions-php-cs-fixer-rule)
2021-05-15 13:28:50 -04:00
HDVinnie
cae5a1accc Apply fixes from StyleCI
[ci skip] [skip ci]
2021-04-30 08:08:59 +00:00
HDVinnie
64743be4b7 update: route service provider 2021-04-30 04:08:35 -04:00
HDVinnie
a975116218 refactor: preslash simple functions
- Add pre-slash to short named functions to improve performance by almost 30%
-  @see https://stackoverflow.com/questions/55419673/php7-adding-a-slash-to-all-standard-php-functions-php-cs-fixer-rule
2020-07-22 15:09:37 -04:00
HDVinnie
41b617bb2e update: laravel 7 support 2020-07-19 17:33:50 -04:00