Commit Graph

2225 Commits (a5d413a59428e88eb0b69f68d4f021f1caceccb1)

Author SHA1 Message Date
Your Name 29280cd950 Fix silent failure in avatar upload endpoints
AvatarController@store and BaseApiController@avatarUpdate wrapped the
upload flow in an empty catch(\Exception) block and returned a success
response even when the upload or save failed.

Log the exception and return a real error response (500 JSON for the
API endpoint, a redirect with validation errors for the web endpoint).

Adds regression tests covering the failure path, the success path, and
non-image rejection.
3 weeks ago
dansup 7332e251cd
Merge pull request #7006 from darkdi/fix/groups-topic-pf-type
Drop the no-op pf_type assignment in the group topic feed
3 weeks ago
Daniel Supernault 9e33bed630
Add only_reposts 3 weeks ago
Daniel Supernault 4c4a457fe4
Update ApiV1Controller, fix napi in timelines 3 weeks ago
Dmitry Rantovov 71cade540a Drop the no-op pf_type assignment in the group topic feed 3 weeks ago
Daniel Supernault 5468eaeb56
Update ASF 3 weeks ago
Daniel Supernault ccac8b31bd
Update Report endpoint, add support for optional message 3 weeks ago
Shlee 32bec52edb
Merge pull request #6985 from pixelfed/chore/laravel12-skeleton-uplift-v2
Laravel 12 skeleton uplift v2
3 weeks ago
Shlee c623a7afbf
Remove 'true' argument from usernameToId call 3 weeks ago
Shlee 7c3644c3e1
Update ApiV1Controller.php 3 weeks ago
Shlee 45e4de3928
Add success message for profile update action 3 weeks ago
Shlee 10ae3fa8cb
Update AdminReportController.php 3 weeks ago
Your Name 400f00c5e1 feat: storage:maintenance command + in-flow cleanup of emptied dirs
Replace the remcache GC (GarbageCollectorRemcache / gc:remcache) with a
broader storage:maintenance command that sweeps stale remcache temp files and
recursively removes the random empty directories accumulated under the media,
story, avatar and import trees (--hours/--only/--except/--dry-run), scheduled
daily.

Fix the root causes so flows clean up after themselves rather than relying on
the sweep:
- MediaDeletePipeline removes its own emptied m/_v2 leaf dir
- AvatarOptimize logs the previously-swallowed exception, still cleans up the
  old avatar on failure, and removes the old file's now-empty splayed dir
- AvatarController::deleteAvatar removes the emptied splayed dir
- StoryExpire/StoryDelete remove the story's own emptied leaf dir
- TransformImports removes imports/{userId} once its files are moved out
- StoryFetch cleans up its remcache temp file in a finally block
3 weeks ago
Your Name b52c3d7659 perf: fix N+1 queries; fix ComposeController lint and test namespace
Performance:
- TrendingHashtagService: batch-load hashtags with whereIn/keyBy instead
  of Hashtag::find() per trending row.
- DirectMessageController: eager-load status.media and read the in-memory
  collection instead of firstMedia() issuing a query per DM message.
- GroupsSearchController: batch Profile/Follower/GroupInvitation lookups
  with whereIn instead of per-invitee queries.

Lint/tests:
- ComposeController: whitespace formatting (Pint).
- ComposeControllerTest: correct App\User to App\Models\User, fixing the
  larastan class.notFound error and import ordering.

Full suite: 547 passed. Pint and PHPStan clean.
3 weeks ago
Shlee d9817840c1
Merge pull request #6955 from hohoho1886/location-country-search
Add country filtering to location search
3 weeks ago
Your Name 40b323bca4 revert: remove emoji local-to-cloud storage changes
Back out all emoji cloud-storage work from staging so it can be reworked and
re-landed separately (the URL resolution flips to cloud on a global config
flag, which created a broken-URL window, and the migration approach needs
revisiting).

Reverts to pre-emoji state:
- CustomEmoji model URL/storage helpers (urlForPath, storageTarget, storeMedia,
  storeMediaFromFile, deleteMedia, url) and callers in ImportEmojis,
  CustomEmojiService, AdminController
- admin custom-emoji blade views back to local /storage URLs
- Remove admin:EmojiMoveStorageLocalToCloud command
- Remove the deploy migration and its scheduler entry

Media (and the already-reverted story) scheduler entries are untouched.
4 weeks ago
Your Name fa76e1014a feat: store custom emoji on cloud storage when enabled
Custom emoji were always written locally and served via hardcoded /storage
URLs, so they never used S3 even on cloud instances.

- CustomEmoji: centralize URL + storage on the active disk (cloud when
  pixelfed.cloud_storage is enabled, else local public/ disk) via
  urlForPath/url/storageTarget/storeMedia/storeMediaFromFile/deleteMedia
- Route emoji writes/deletes and URL generation (scan, CustomEmojiService::all)
  through those helpers in ImportEmojis, CustomEmojiService::import and
  AdminController
- Add admin:EmojiMoveStorageLocalToCloud to migrate existing local emoji to
  cloud: copy, verify by size, delete local, bust caches
- Schedule it daily when cloud storage is enabled
4 weeks ago
Nguyen Ninh Dao 129778ef2e implement search by country 4 weeks ago
Your Name d86fd28e34 polish 4 weeks ago
Shlee a82dc91295
Merge branch 'staging' into dev 4 weeks ago
Shlee 3dfa249f3c
Merge pull request #6914 from pixelfed/fix/cached-eloquent-model-incomplete-object
Refactor: stop caching raw Eloquent models to prevent incomplete-object 500s
4 weeks ago
Daniel Supernault 0679216fa2
Update AdminReportController 4 weeks ago
Your Name f0e951dcce fix: stop caching raw Eloquent models to prevent incomplete-object 500s
Caching an Eloquent model in a Cache::remember closure could deserialize
into a __PHP_Incomplete_Class on read, throwing 'attempt to access a
property on an incomplete object' and returning a 500. This surfaced on
guest profile pages (ProfileController::buildProfile reading
$user->user->settings) and affected several other latent call sites.

Changes:
- ProfileController: cache a plain settings array instead of the
  UserSetting model; fall back to defaults when the settings row is missing
- StoryService::getById: fetch a live model instead of caching it
- InstanceService::getByDomain, CustomEmoji::scan: cache arrays
- Site/MobileController: cache Page data as an array via a shared
  ManagesCachedPages trait; update blade views to array access
- Add public-route smoke/regression tests covering the cache-read path
4 weeks ago
Your Name 302edf09d5 refactor: rename PixelfedUsername rule to ValidUsername
Pure rename of the App\Rules\PixelfedUsername validation rule to
App\Rules\ValidUsername for a clearer, more idiomatic name. Updates
the class, filename, test, and all 8 controller call sites. No
behavior change.
4 weeks ago
Your Name 7c5d93e96b refactor: consolidate username validation into PixelfedUsername rule
Replace 7 duplicated inline username validation closures across 6
controllers (ApiV1Dot1, RemoteAuth, CuratedRegister, AdminInvite x2,
AppRegister, Auth/Register) with the existing PixelfedUsername rule.

Add the 'must contain at least one alphabetical character' check to
the rule so all call sites share consistent, stricter validation.

Add PixelfedUsernameTest covering all validation branches.
4 weeks ago
Daniel Supernault e3a2640704
Fix endsWith. Closes #6904 4 weeks ago
Your Name e7b70c6084 refactor: extract duplicate patterns into shared methods
1. Add FractalService with static item() and collection() helpers
   replacing 22 call sites that repeated the 4-line Fractal Manager
   + ArraySerializer boilerplate.

2. Add AccountInterstitial::createFromStatus() factory method
   consolidating 4 identical 15-line blocks that create interstitials
   with status metadata.

3. Add NotificationService::createNotification() to handle the
   repeated pattern of creating, caching, and registering a
   notification in the recipient's feed.

4. Add NotificationService::firstOrCreateNotification() for
   idempotent notifications (share/boost, mention) that should
   only notify once per actor+action+item combination.
4 weeks ago
Shlee f018004b56
Merge pull request #6892 from pixelfed/refactor/move-models-to-namespace
Refactor/move models to namespace
4 weeks ago
Shlee b4afda12d5
Merge pull request #6889 from pixelfed/refactor/status-delete-http-client
refactor: replace Guzzle pool with Laravel HTTP client in StatusDelete
4 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 a142db87b4 polish 4 weeks ago
Your Name 2b1c9c818b polish 4 weeks ago
Your Name 17a5b5c3de fix: resolve 6 Larastan errors in controller return types
- DeckController: add missing View contract import
- CuratedRegisterController::proceed(): add default switch case
- GroupController::reportAction(): add default switch case
- InstallController::checkDatabase/precheckDatabase: add missing return
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
Daniel Supernault 33dce75f2c
Pint app/ 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 f54e6280bc comment dead code 4 weeks ago
Your Name ea2d054a40 Revert "fix: remove dead publicApi/homeApi methods from TimelineController"
This reverts commit 8cf5321566.
4 weeks ago
Your Name 8cf5321566 fix: remove dead publicApi/homeApi methods from TimelineController
- publicApi referenced non-existent StatusTimelineTransformer class
- Neither method is routed anywhere
- Removes unused imports (Fractal, Cache, Status, Profile, UserFilter)
4 weeks ago
Your Name 5a364be58b fix: remove deprecated Passport::personalAccessClientId() and enableImplicitGrant()
- Remove Passport::personalAccessClientId() (removed in Passport v13, auto-discovers now)
- Remove Passport::enableImplicitGrant() (legacy grant, no clients use it)
- Flatten config instance.oauth.pat to pat_enabled (remove dead pat.id key)
- Add OAUTH_PAT_ENABLED=false to .env.example and .env.docker.example
- Show swal alert when PATs disabled instead of hidden API error
- Improve store() error handling to surface 403 messages in the UI
- Remove OAUTH_PAT_ID row from admin diagnostics blade
4 weeks ago
Shlee 3c6280111e
Update AccountController.php 4 weeks ago
Your Name ffcef3eb2d fix: replace Auth facade with $request->user() in request-scoped classes
Replace Auth::user() with $request->user() and Auth::check() with
$request->user() !== null (or ! $request->user()) across all
controllers and middleware that have access to the request object.

This resolves 99 larastan.noAuthFacadeInRequestScope errors and
improves Octane compatibility.

For protected helper methods without $request in scope, uses the
request() helper instead.

Methods that previously lacked a Request parameter but used Auth
facade now accept Request $request via Laravel's auto-injection.
4 weeks ago
Your Name 97929f0876 fix: resolve str_ends_with TypeError in RegisterController
PHP's str_ends_with() only accepts a string needle, not an array.
The username validation was passing an array of extensions which
caused a TypeError on every registration attempt.

Replace with a loop over a configurable array of disallowed extensions,
making it easy to add new entries.

Also updates RegisterTest to properly test the registration flow
including the RT anti-bot token and age verification fields.
4 weeks ago
Your Name 8a2649b3ff feat: add critical path test suite and fix auth/config issues
Test Infrastructure:
- Modernize phpunit.xml (bootstrap, source block, Laravel 12 env vars)
- Configure tests/Pest.php with pest()->extend(TestCase::class)->in('Feature')
- Add docker-compose.test.yml (Redis for test suite)
- Add composer test/test:quick scripts
- Rename CACHE_DRIVER to CACHE_STORE across config (backwards compatible)
- Update .env.testing for in-memory SQLite + Docker Redis

Test Coverage (190 tests):
- CriticalRoutes: public routes, auth routes, API endpoints, middleware, schedule
- Auth/LoginTest: login, logout, rate limiting, redirect behavior
- Auth/RegisterTest: registration flow, validation, disabled registration
- Auth/PasswordResetTest: reset request, token validation, password update
- Auth/TwoFactorTest: 2FA checkpoint, setup behind password confirmation
- Auth/PasswordConfirmationTest: sudo mode flow via Laravel password.confirm
- Api/ScopeTest: scope enforcement, public endpoints, admin access

Bugs Fixed:
- Fix unauthenticated API returning 500 instead of 401 (AuthenticationException
  not handled in custom exception renderer in bootstrap/app.php)
- Replace custom DangerZone middleware with Laravel password.confirm
- Add HasFactory trait to Profile model for test factories

Bugs Documented (known-bugs group):
- Registration crashes with str_ends_with TypeError (RegisterController:82)
- OAuth routes use legacy array syntax causing ReflectionFunction TypeError
4 weeks ago
Your Name 1617734907 Revert "Merge pull request #6851 from pixelfed/fix/phpstan-auth-request-scope-2"
This reverts commit ce4baf6995, reversing
changes made to 9235cb979a.
4 weeks ago
Your Name 0939f495bb fix: replace Auth facade with $request->user() in request-scoped classes
Replace Auth::user() with $request->user() and Auth::check() with
$request->user() !== null (or ! $request->user()) across all
controllers and middleware that have access to the request object.

This resolves 99 larastan.noAuthFacadeInRequestScope errors and
improves Octane compatibility.

For protected helper methods without $request in scope, uses the
request() helper instead.

Methods that previously lacked a Request parameter but used Auth
facade now accept Request $request via Laravel's auto-injection.
4 weeks ago
Your Name e7ef58969c fix: resolve undefined $status variable in GroupsPostController::deletePost
Replace all references to non-existent $status with $gp (the GroupPost
instance already in scope). This was a bug where the closure variable
name was changed but references inside the method body were not updated.
4 weeks ago
Your Name 7c964f3b4f fix: replace backslash-prefixed facade calls with imported references
Replace \Cache::, \Log::, \DB:: calls with their imported facade
equivalents. The backslash-prefix relies on global aliases which
PHPStan cannot resolve, causing class.notFound errors.
4 weeks ago
Shlee 58a34056ca
Update TimelineController.php 4 weeks ago
Shlee b7626891df
Merge pull request #6845 from pixelfed/fix/phpstan-variable-undefined
fix: resolve undefined variable bugs (phpstan variable.undefined)
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
Your Name ccd75dd903 fix: resolve undefined variable bugs (phpstan variable.undefined)
- AdminReportController: fix closure param name and remove reference to
  undefined $meta variable
- GroupsPostController: replace $status with $gp (the actual GroupPost
  variable in scope)
- PortfolioController: replace undefined $metadata with null
- DeleteWorker: remove Cache::set() call with undefined $key
4 weeks ago
Your Name 58efefb878 fix: add missing FeedUnfollowPipeline import
Add missing use statement for FeedUnfollowPipeline in PrivacySettings
and FollowerObserver. These caused PHPStan internal errors blocking
full analysis.
4 weeks ago
Your Name c807a8524c refactor: replace short facade aliases with fully-qualified imports
Convert all 273 short facade alias imports (e.g. 'use Cache;') to their
fully-qualified class names (e.g. 'use Illuminate\Support\Facades\Cache;')
across 193 files.

This resolves 643 PHPStan 'class.notFound' errors caused by the static
analyzer being unable to resolve global aliases, and aligns with modern
Laravel conventions. It also unblocks removing the aliases array from
config/app.php in a future change.

All 107 tests pass.
4 weeks ago
Thomas Jacumin a113bf071e
Merge branch 'staging' into dev 4 weeks ago
Your Name 98267eb26f refactor: replace deprecated str_random() with Str::random()
str_random() is a deprecated helper from laravel/helpers that was
missed in the initial helpers removal. Replace all 18 call sites
with the modern Str::random() equivalent.
4 weeks ago
Your Name edb4368b08 refactor: replace deprecated laravel/helpers with native alternatives
Replace all deprecated helper function calls:
- str_slug() → Str::slug()
- starts_with() → str_starts_with()
- ends_with() → str_ends_with()
- array_first() → Arr::first()
- array_last() → Arr::last()
- array_flatten() → Arr::flatten()

Remove laravel/helpers package from composer.json as it is no longer
needed and will not be maintained for Laravel 13.
4 weeks ago
Daniel Supernault 8f1e475407
Fix typo 4 weeks ago
Daniel Supernault 7937d91c37
Update ApiV1Controller, add is_suggestable to update_credentials endpoint 4 weeks ago
Daniel Supernault 4e2e49f843
Update ApiV1Controller, add show_atom support to update_credentials endpoint 4 weeks ago
Your Name 79541afaa0 Merge origin/staging, resolve conflicts keeping matomo/device-detector over jenssegers/agent 4 weeks ago
Shlee 80738385ba
Merge pull request #6777 from pixelfed/fix/pat-creation-500-6630
Fix: Bounce error on PAT when OAUTH_PAT_ENABLED is false
4 weeks ago
Shlee 06e3351e92
Merge pull request #6778 from pixelfed/fix/prevent-pat-client-deletion-6630
Fix: Improve the web UX for deleting the OAuth Client and PAT
4 weeks ago
Shlee fb655f1308
Merge pull request #6782 from ashleyhull-versent/shift-179490
Laravel Shift Preshift
4 weeks ago
Ashley Hull ab07a705e6
Merge branch 'dev' into shift-179490 4 weeks ago
Shlee 68dca50973
Merge pull request #6774 from pixelfed/fix/oauth-scope-bypass-remove-follower-6643
Fix: OAuth accountRemoveFollowById to check token.
4 weeks ago
Shlee 20123ff5ba
Merge pull request #6773 from pixelfed/fix/first-follower-pagination-6695
Fix: Show first follower/following record excluded from previous API responses
4 weeks ago
Your Name 552a55c2d2 Upgrade images to v4 4 weeks ago
Daniel Supernault 91645faeee
Lint 4 weeks ago
Daniel Supernault e1235dfd75
Fix ApiV1Controller, ensure follow notifications have an account 4 weeks ago
Thomas Jacumin 9d0b5949e9 Use Mastodon username convention for OIDC 4 weeks ago
Your Name 53759e3ad6 Prevent deletion of personal access OAuth client
Fixes #6630 (partial — deletion causing broken PAT)

If a user deletes the OAuth client that serves as the personal access
client, all PAT creation breaks for the entire instance with a 500 error.

Changes:
- Add custom OAuthClientController@destroy that checks if the client
  has the personal_access grant type before allowing deletion
- Returns 403 with a clear error message if deletion is blocked
- Add confirmation dialog before client deletion in the frontend
- Add error handling to show server error messages to the user

This prevents accidental destruction of the PAT infrastructure.
4 weeks ago
Your Name 1ab677a526 Handle PAT creation gracefully when not configured
Fixes #6630 (partial — PAT 500 error)

Previously, POST /oauth/personal-access-tokens would throw an unhandled
RuntimeException (HTTP 500) when:
- OAUTH_PAT_ENABLED is false (the default), or
- No personal access client exists in the database

Now the endpoint:
1. Returns 403 with a clear message if PAT is disabled in config
2. Catches RuntimeException from the token factory and returns 500
   with an actionable error message instead of a stack trace
4 weeks ago
Your Name 822e9c98cb Fix OAuth scope bypass on remove_from_followers endpoint
Fixes #6643

The POST /api/v1/accounts/{id}/remove_from_followers endpoint was missing
the token existence check (! $request->user()->token()). While the
tokenCan('follow') scope check was already present, the missing token
guard meant unauthenticated token-less requests could potentially bypass
the scope enforcement.

Added the standard guard pattern consistent with accountFollowById and
accountUnfollowById endpoints.

Also adds tests verifying:
- Read-only tokens are denied (403)
- Follow-scoped tokens succeed (200)
- Unauthenticated requests are denied (403)
4 weeks ago
Your Name 396cf2d861 Fix first follower/following record excluded from API responses
Fixes #6695

When no pagination params are provided, the default min_id was set to 1
and the query used 'id > 1', which excluded the very first follower row
(id=1) on fresh instances.

Changed default min_id from 1 to 0 and switched the direction check from
truthy evaluation to !== null, so the query becomes 'id > 0' which
correctly includes all records.
4 weeks ago
Shift 19880c2ffb
Convert string references to `::class`
PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP.
4 weeks ago
Your Name 651f0de74f Replace jenssegers/agent with matomo/device-detector
- Remove unmaintained jenssegers/agent package (no releases since 2021)
- Add matomo/device-detector v6.5 as actively maintained replacement
- Create App\Services\UserAgentService wrapper for drop-in compatibility
- Update UserDevice model and ApiV1Dot1Controller to use new service
4 weeks ago
dansup 268ab6dba0
Merge branch 'staging' into remove-exp-pue 1 month ago
dansup 7354f63563
Merge branch 'staging' into remove-exp-rec 1 month ago
Daniel Supernault 26ee049d07
Update AppRegisterController 1 month ago
Daniel Supernault fbff6ed307
Update trustedproxy config 1 month ago
Daniel Supernault a2be0cb47d
Update CommentController 1 month ago
Daniel Supernault 40aef7a212
Update GroupsFeedController 1 month ago
Daniel Supernault 5f397f9135
Update StoryController 1 month ago
dansup f568804426
Merge pull request #6680 from pixelfed/shleeable-patch-15
Update FollowerObserver.php
1 month ago
dansup d6cd65463d
Merge pull request #6676 from pixelfed/shleeable-patch-10
Stories API: PostgreSQL story carousel endpoints crash due to calling collection methods on query builder
1 month ago
dansup 668653039f
Merge pull request #6663 from vinzgreg/fix/api-status-edit-auth-guard
Fix API status editing: use auth:api guard
1 month ago
dansup ca5f83d2d1
Merge pull request #6655 from TowyTowy/fix/timeline-home-nullable-max-id
Fix home timeline rejecting empty max_id/min_id pagination params
1 month ago
dansup 5aae3f46c7
Merge pull request #6691 from pixelfed/shleeable-patch-26
Improve validation
1 month ago
dansup 219297d0e3
Merge pull request #6690 from pixelfed/shleeable-patch-25
Typo: change pid to id for FollowerService::remove
1 month ago
dansup 6910115166
Merge pull request #6686 from pixelfed/shleeable-patch-20
Update type on abort.
1 month ago
dansup 77831e7640
Merge pull request #6688 from pixelfed/shleeable-patch-22
Clear oauth material on permanent delete
1 month ago
dansup 5115e5c960
Merge pull request #6677 from pixelfed/shleeable-patch-12
Typo in abort
1 month ago
dansup 179dfffafe
Merge pull request #6672 from pixelfed/shleeable-patch-5
Places directory crashes on PostgreSQL for multi-word country URLs (case-sensitive mismatch)
1 month ago
Shlee c2044f77cf
Update AdminUserController.php 1 month ago
Shlee 1d72f1b437
Update ApiV1Controller.php 1 month ago
Shlee fbe98ea4de
Update AccountController.php 1 month ago
Shlee 9966eb50b8
Update ApiV1Controller.php 1 month ago
Shlee 87d866f58d
Update SettingsController.php 1 month ago
Shlee baf21797f0
Update RemoteOidcController.php 1 month ago
Shlee 0f79861f1d
Update PrivacySettings.php 1 month ago
Shlee 4e6b341532
Update StoryController.php 1 month ago
Shlee 8ce4b5d409
Update StoryApiV1Controller.php 1 month ago
Shlee f99ee65676
Update PlaceController.php 1 month ago
Shlee 6f5f6e3368
Update ReportController.php 1 month ago
vinzgreg d19671a92c Fix API status editing: use auth:api guard
StatusEditController's constructor applies the web `auth` guard, which
Bearer/OAuth clients cannot satisfy. PUT /api/v1/statuses/{id} and
GET /api/v1/statuses/{id}/history therefore fail for every third-party
API client, while status create/delete keep working because
ApiV1Controller has no controller-level web auth.

The controller is routed only from routes/api.php, where the route group
already applies ['auth:api', 'validemail'], so no web/session route
depends on the old guard. Switch the constructor to match.
2 months ago
TowyTowy 795473be55 Fix home timeline rejecting empty max_id/min_id pagination params
`GET /api/v1/timelines/home?max_id=` (empty value) fails validation
because `min_id`/`max_id` use the `sometimes|integer` rule. The global
`ConvertEmptyStringsToNull` middleware turns `?max_id=` into `null`, and
since the field is present, `sometimes` does not skip it while `null`
fails the `integer` rule — returning HTTP 422.

Every other timeline/listing endpoint in this controller (timelinePublic,
accountStatusesById, etc.) uses `nullable|integer` for these params, so
`timelineHome` was the lone outlier. Mastodon-API clients such as Pixelfed
for iOS send `max_id=` on first page load and could not paginate the home
timeline.

Switch `min_id`/`max_id` to `nullable|integer` to match the rest of the
controller.

Fixes #6610

Co-Authored-By: Claude <noreply@anthropic.com>
2 months ago
Daniel Supernault 0f781cba34
Update Personal Access Tokens 3 months ago
Daniel Supernault fb92949a71
Update PersonalAccessTokenController.php 3 months ago
Daniel Supernault 25d5142f12
Fix PAT + oauth routes 3 months ago
Daniel Supernault 9fe9b7eb32
Update AdminInviteController 3 months ago
dansup 096a1bc901
Merge pull request #6553 from pixelfed/w2
OAuth: Token endpoint response loses required no-store/no-cache headers
4 months ago
dansup 120b08b758
Merge pull request #6563 from pixelfed/shleeable-patch-1
Update to Passport 13 refresh token method in AppRegisterController.php
5 months ago
Your Name 3c9fc9a1fe Remove EXP_PUE flag, post editing is always enabled
Remove the 'pue' entry from config/exp.php and the abort_if guard
in StatusEditController. Post editing is now unconditionally available.
5 months ago
Your Name 10a5eb7228 Remove exp.rec recommendations dead code
- Remove userRecommendations controller method and /api/local/exp/rec route
- Remove suggestions UI panel, data properties, and methods from Timeline.vue
- Remove commented-out suggestions card from feed template

The recommendations feature was deprecated and hardcoded to false/empty.
5 months ago
Daniel Supernault 14b325641f
Update Password Change with new Revoke Sessions option
As requested in https://lgbtqia.space/@serigala_tropis/116412473982617371
5 months ago
Shlee bbd09fe50f
Update AppRegisterController.php 6 months ago
Your Name b329ee9edc API: Media uploads leak orphaned files when status creation validation fails 6 months ago
Your Name 3d858af1fa OAuth: Token endpoint response loses required no-store/no-cache headers when adding created_at 6 months ago
dansup 6e9c33fcab
Merge pull request #6496 from pixelfed/shleeable-patch-7
Remove sleep from AppRegisterController.php
6 months ago
dansup bdc203dc5c
Merge pull request #6493 from ShadowJonathan/fix-profile-saving
Make sure profile saving has a clear error when email is not verified
6 months ago
Daniel Supernault ef803ae9b6
Fix oauth/token 6 months ago
Daniel Supernault f6746aec8b
Update AuthServiceProvider 7 months ago
Daniel Supernault 52f5626530
Fix oauth 7 months ago
Daniel Supernault 695e851026
Fix oauth 7 months ago
Shlee d9bd6d446f
Update AppRegisterController.php 7 months ago
Jonathan de Jong 8e91918b88
Make sure profile saving has a clear error when email is not verified 7 months ago
Shlee 1b21f83132
Update BaseApiController.php 7 months ago
dansup f1af72e66d
Merge pull request #6454 from pixelfed/a5
Bugfix: Validation was ignored, allows any file type/size
7 months ago
Daniel Supernault c975ddb13f
Update composer deps 7 months ago
Your Name 1a1dc5e096 fix typo 8 months ago
Daniel Supernault 3140404835
Update ApiV1Controller.php 8 months ago
Daniel Supernault 80a2f4f2b0
Add api/v1/accounts/lookup endpoint 8 months ago
Daniel Supernault f76567f67b
Improve reblog check 8 months ago
Severin 066f8ee309
Pulls user settings for reblogs 8 months ago
dansup 1f04a190a9
Merge pull request #6438 from pixelfed/shleeable-patch-22
UpdatePersonValidator rejects null name/summary due to required|nullable conflict
8 months ago
dansup fc694dd37a
Merge pull request #6431 from grossermensch/patch-1
Fix for portfolio with recent images not showing up on PSQL
8 months ago
dansup b3fdc41816
Merge pull request #6429 from albattran/dev
Added pagination to the followers/followings API endpoints
8 months ago
dansup ceec5a0eea
Merge pull request #6419 from pixelfed/shleeable-patch-18
Bugfix: CommentController : inherit appropriate visibility
8 months ago
dansup 70f3206b51
Merge pull request #6415 from pixelfed/shleeable-patch-14
Bugfix: Reversed follower check in PublicApiController::scopeCheck for private accounts.
8 months ago
dansup ebb119e4df
Merge pull request #6410 from pixelfed/shleeable-patch-9
Bugfix: Missing status filter exposes suspended/disabled profiles via ActivityPub in getCachedUser(withTrashed)
8 months ago
dansup 11692c72e9
Merge pull request #6408 from pixelfed/shleeable-patch-3
Bugfix: Account deletion proceeds without validation server side.
8 months ago
Shlee ac19942083
Update RemoteAuthController.php 8 months ago
Severin b948a31e61
Fix for portfolio with recent images not showing up on PSQL 8 months ago
samir 9c3130a3c7 Added pagination to the followers/followings API endpoints 8 months ago
Shlee 4419054ae5
Update CommentController.php 8 months ago
Shlee da03ca79d5
Update PublicApiController.php 8 months ago
Shlee 8394b8ac4b
Update ProfileController.php 8 months ago
Shlee 43f6686667
Update SettingsController.php 8 months ago
Shlee def22b267d
Update BookmarkController.php 8 months ago
Daniel Supernault ef6187b917
Fix LoginController 9 months ago
Daniel Supernault 0032eaf482
Fix AdminController 9 months ago
Daniel Supernault 34278c77c2
Update LoginController 9 months ago
Daniel Supernault 374344754e
Lint 9 months ago
Rm Yakovenko 7cb54eb7c2 [Bug]: public API endpoint /accounts/{id}/statuses ignores max_id parameter 10 months ago
Daniel Supernault 4bc1e22121
Refactor LikePipeline and improve Undo Announce handling 10 months ago
Daniel Supernault 04bf75fb68
Revert inbox changes 10 months ago
dansup f783db493a
Merge pull request #6340 from grossermensch/patch-3
Allow to set new image types in admin interface
10 months ago
dansup eae2dafcac
Merge branch 'staging' into intervention-laravel-clean 10 months ago
Severin df5814d0f8
Allow to set new image types in admin interface 10 months ago
Shlee fabb93d4a0
Update StoryComposeController.php 10 months ago
Your Name 45a9a3b472 RemoveUnreachableStatementRector 11 months ago
dansup 7881b09c2f
Merge pull request #6304 from pixelfed/classV2
Larastan: Fix Missing classes 2 - Medium risk
11 months ago
dansup 14d5fe940e
Merge pull request #6302 from pixelfed/miscClosureUnusedUseV2
Larastan: fix Unused Use - Low risk
11 months ago
dansup f9d430d6e6
Merge pull request #6299 from pixelfed/classNotFoundV1
Larastan: Fix Missing classes - Low risk
11 months ago
dansup 99e89814b4
Merge pull request #6295 from pixelfed/shleeable-patch-20
Dead Code - Delete app/Http/Controllers/Api/InstanceApiController.php - Low Risk
11 months ago
dansup 6df58e67f2
Merge pull request #6290 from pixelfed/emptyv1
Larastan: 'empty() always exists and is not falsy' errors - Low risk
11 months ago
dansup 93217c8c63
Merge pull request #6284 from pixelfed/shleeable-patch-15
Larastan: Remove unused arg from Function config_cache - Safe/Mergable
11 months ago
dansup d2acad9388
Merge pull request #6283 from pixelfed/shleeable-patch-14
Larastan: Update GroupsPostController.php - Safe/Mergable
11 months ago
dansup bc9a974037
Merge pull request #6280 from pixelfed/refactor-RemoveDuplicatedArrayKeyRector
Larastan: Removed duplicated Keys in arrays.
11 months ago
dansup e5c6ac0eca
Merge pull request #6274 from pixelfed/shleeable-patch-9
Larastan: Update BaseApiController.php
11 months ago
dansup 59e1e12625
Merge pull request #6273 from pixelfed/shleeable-patch-8
Larastan: Update ResetPasswordController.php / ForgotPasswordController.php
11 months ago
Your Name 15cc07e602 Fix all class.notFound PHPStan issues - 31 fixes 11 months ago
Your Name 28ed625f12 Fix PHPStan closure.unusedUse issues - 7 fixes 11 months ago
Your Name ca6c875bbb Fix PHPStan class.notFound issues 11 months ago
Shlee e297cd0e94
Dead Code - Delete app/Http/Controllers/Api/InstanceApiController.php 11 months ago
Your Name 72e840345e Fix PHPStan 'empty() always exists and is not falsy' errors
- Remove redundant empty() checks where variables are guaranteed to exist and be non-falsy
- Replace empty() with simple null/false checks where appropriate
- Maintain original logic while fixing static analysis issues
- Affected files:
  - app/Http/Controllers/GroupController.php
  - app/Http/Controllers/ProfileAliasController.php
  - app/Jobs/ImageOptimizePipeline/ImageUpdate.php
  - app/Jobs/InboxPipeline/DeleteWorker.php
  - app/Jobs/InboxPipeline/InboxValidator.php
  - app/Jobs/InboxPipeline/InboxWorker.php
  - app/Jobs/ProfilePipeline/HandleUpdateActivity.php
  - app/Rules/ExpoPushTokenRule.php
  - app/Services/AutospamService.php
  - app/Services/CollectionService.php
  - app/Services/NotificationAppGatewayService.php
  - app/Services/WebfingerService.php
  - app/Util/ActivityPub/Helpers.php
11 months ago
Shlee 133e497879
Larastan: Update ComposeController.php 11 months ago
Shlee 304c3eab3f
Update GroupsPostController.php 11 months ago
Your Name e43078961c Fix PHP deprecation warnings for implicit nullable parameters
- Add explicit nullable type declarations to GroupService::log() method parameters
- Add explicit nullable type declaration to ModLogService::metadata() method parameter
- Add explicit nullable type declaration to HitHighlighter::highlight() method parameter
- Resolves PHP 8.1+ deprecation warnings about implicitly marking parameters as nullable
11 months ago
Daniel Supernault cc90df9d8c
Add user admin toggles for email and ip 11 months ago
Shlee 8d197107e8
Update BaseApiController.php 11 months ago
Shlee b826f4fe48
Update ForgotPasswordController.php 11 months ago
Shlee 4adc8947d8
Update ResetPasswordController.php 11 months ago
dansup ea0fd2e719
Merge pull request #6261 from pixelfed/shleeable-patch-24
Larastan: Update FederationController.php
11 months ago
Shlee d8c9d72f11
Update FederationController.php 11 months ago
Shlee 5a3d841e19
Update AccountController.php 11 months ago
dansup f2e4715749
Merge pull request #6194 from emlove/migration
Account Migration fixes
11 months ago
dansup 1586808b11
Merge pull request #6189 from rossbearman/admin-invites
Admin web interface for creating and expiring invites; add invitation emails
11 months ago
Daniel Supernault 76b5601a01
Update IG Import
To support non-local fs
11 months ago
Daniel Supernault 03d01d296f
Update StoryComposeController.php
Fix non-local storage bug
11 months ago
Daniel Supernault 02455129a5
Update StoryComposeController.php
Fix support for non-local fs
11 months ago
Emily Love Watson 7709d5da29
Cleanup 12 months ago
Emily Love Watson 871efff1a8
Remove unused params 12 months ago
Emily Love Watson 453ae4b32e
MVP migration 12 months ago
Ross Bearman db03733415 Add admin invite interface and email support
This commit does two things:

* Add invite email support to AdminInviteCommand
  - Moves `invite_code` generation to AdminInvite model `creating` event
* Add admin invite management section under admin users dashboard
  - Adds `Admin/AdminUserInviteController` and associated `home` and
    `create` Blade templates.
  - Adds "Invites" button to admin user dashboard
1 year ago
Daniel Supernault 3686c92122
Update Status storage, add SanitizerService to fix spacing in html stripped content 1 year ago
Daniel Supernault ec21eec508
Update ApiV1Dot1Controller, fix Story report follower check 1 year ago
Daniel Supernault f195102b34
Update StoryApiV1Controller, reduce min story size to 10kb 1 year ago
Daniel Supernault 5d4674daa4
Update ApiV1StoryController, fix viewer pagination
Fix cursor pagination
1 year ago