Commit Graph

23 Commits (e3b6cebf279e6c495233cbb8c585ba2120dd8a95)

Author SHA1 Message Date
Your Name 3a23606573 Enforce can-post role check on POST /api/v2/media 1 week ago
Your Name 6496904293 Fix account storage limit not freeing on media deletion (#7169)
users.storage_used only ever grew: uploads incremented it but no deletion
path decremented it, so users hit the account size limit even when their
real media usage was well below it.

- Decrement storage_used in MediaDeletePipeline when media is removed
- Add UserStorageService::increaseStorageUsed / decrementStorageUsed as the
  fast, symmetric hot-path counter updates (floor-based, clamped at zero)
- Refactor the 6 upload call sites to use increaseStorageUsed instead of
  duplicated inline writes (also fixes ceil/floor drift vs the reconciler)
- Add (user_id, size) covering index so per-user SUM(size) is not a full
  table scan (INPLACE/LOCK=NONE, skipped on sqlite)
- Add user:storage:recalculate command to repair affected accounts, with a
  daily --stale=168 scheduled reconciler to correct any drift
- Add regression tests for the pipeline and UserStorageService
2 weeks ago
Your Name ec6827bae2 Check media blocklist before storing uploads to prevent orphaned files 2 weeks ago
Your Name c0cde2f682 refactor: move 52 legacy models from App\ to App\Models\
Move all Eloquent models from the app/ root directory to app/Models/
for consistency with modern Laravel conventions. The project already had
54 models in App\Models; this migrates the remaining 52 legacy models.

Changes:
- Move 52 model files from app/ to app/Models/
- Update namespace declarations in each model
- Update all ~1000 import references across the codebase
- Add Relation::morphMap() in AppServiceProvider for backward
  compatibility with existing polymorphic database records
- Add missing HasSnowflakePrimary imports for models that relied
  on same-namespace resolution
4 weeks ago
Your Name 54cfdf3c2b refactor: add return type declarations to controller methods
Adds explicit return type declarations to 498 controller methods
across 88 files. Types inferred from return statements:

- JsonResponse for response()->json() returns
- RedirectResponse for redirect()/back() returns
- View (contract) for view() returns
- Response for response() returns
- void for methods with no return value
- array for array returns
- string/int/bool for scalar returns

Also fixes 3 methods with incorrect bare returns:
- AvatarController::deleteAvatar - bare return → json response
- ImportPostController::checkPermissions - bare return → true
- RemoteAuthController::accountToId - bare return → empty array
4 weeks ago
Your Name 4320231c1f fix: replace deprecated $request->get() with $request->input()
Symfony 8.0 removes Request::get(). Laravel 13 will support Symfony 8,
so these 11 usages would break on upgrade. Using $request->input()
which checks both query string and request body (same behavior as the
old get() method).
4 weeks ago
Your Name e7ba43e2e1 fix: add missing use imports to resolve phpstan class.notFound errors
Add missing imports for Log, Cache, DB, FollowerService, StatusService,
LikeService, ReblogService, UserFilterService, AdminProfile, OauthClient,
and fix StatusTimelineTransformer reference (class didn't exist, replaced
with StatusTransformer).
4 weeks ago
Daniel Supernault 374344754e
Lint 9 months ago
Daniel Supernault 4e938a8ffa
Fix heic, avif, webp support and add libvips driver 1 year ago
Daniel Supernault ab9c13fe0d
New supported formats, Preserve ICC Color Profiles, libvips support
Update image pipeline to handle avif, heic and webp and preserve ICC color profiles and added libvips support.
1 year ago
Daniel Supernault 4732019087
Update instance config, return proper matrix limits. Fixes #4780 1 year ago
Daniel Supernault 73b9a75a64
Add UserStorageService 2 years ago
Daniel Supernault 921be4287c
Update ApiV2Controller 2 years ago
Daniel Supernault 5e4d4eff9d
Update config cache 3 years ago
Daniel Supernault 8dac2caf1d
Add Curated Onboarding 3 years ago
Daniel Supernault 545f7d5e70
Update api v1/v2 instance endpoints, bump mastoapi version from 2.7.2 to 3.5.3 3 years ago
Emelia Smith 0f8e45fe75
Implement proper OAuth authorization on API endpoints 3 years ago
Daniel Supernault 4d02d6f12e
Update ApiV2Controller, add vapid key to instance object. Thanks thisismissem! 3 years ago
Daniel Supernault fd9b5ad443
Update api controllers, add parental control support 3 years ago
Daniel Supernault 36df0d8373
Update nodeinfo 3 years ago
Daniel Supernault 1cc6274ac0
Update rate limits, fixes #4537 3 years ago
Daniel Supernault 6a2daf1f63
Update ApiControllers, remove cloud ip blocks 3 years ago
Daniel Supernault 167dbcdd43
Add /api/v2/instance api endpoint 3 years ago