Commit Graph

47 Commits (163cd9f589a485e6191c7ba8b3fa8f666deb80c8)

Author SHA1 Message Date
Your Name 277b8aa970 Use now() helper instead of Carbon::now() for current-time access
Aligns with the app's dominant convention (413 now()/today() call
sites vs 12 Carbon::now()). Carbon::parse() calls are untouched since
they parse arbitrary date strings, not current-time access.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 weeks ago
Shlee 519b1b94dc
Refactor comments in DangerZone middleware
Removed redundant comments to clarify code functionality.
2 weeks ago
Your Name 58e8a4922d Invalidate session on DangerZone forced logout to clear 2FA state 2 weeks ago
Your Name 7483a4b05b Scope DangerZone OIDC sudo bypass to OIDC-registered users 2 weeks ago
Daniel Supernault 584ce27f71
Add Sanctum support 3 weeks ago
Your Name aae7700bf3 fix: resolve 3 remaining Larastan errors from model migration
- AccountInterstitial middleware: fix FQCN reference
- Like/UndoLike transformers: fix aliased import namespace
4 weeks ago
Daniel Supernault 33dce75f2c
Pint app/ 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 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
Shlee 572047280f
Merge pull request #6830 from pixelfed/refactor/modern-bootstrap-app
refactor: migrate to modern Laravel 13+ bootstrap/app.php
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
Your Name ee7d7124d0 refactor: remove thin middleware wrappers, use framework classes directly
Delete 4 middleware wrapper classes that added no custom logic:
- EncryptCookies (empty $except)
- TrimStrings ($except matches framework default)
- VerifyCsrfToken (exceptions moved to validateCsrfTokens() in bootstrap)
- TrustProxies (headers matched framework default)

CSRF exceptions (/api/v1/*, oauth/token) are now configured via
$middleware->validateCsrfTokens(except: [...]) in bootstrap/app.php.

All 107 tests pass.
4 weeks ago
Shlee f6f9d5368c
Update allowed routes for restricted access middleware 4 weeks ago
Daniel Supernault 038a2bbf9f
Lint 3 months ago
Daniel Supernault 374344754e
Lint 9 months ago
Daniel Supernault 062ec55207
Update DangerZone middleware to skip sudo mode for OIDC configurations. Fixes #6057 1 year ago
Daniel Supernault 79ebbc2d9f
Update VerifyCsrfToken middleware, add oauth token. Fixes #5426 2 years ago
Emelia Smith 4afe72e62f
Add oauth protection to admin domain blocks API 3 years ago
Daniel Supernault a8453e7719
Update api routes, add DeprecatedEndpoint middleware 3 years ago
Daniel Supernault a9d588e15e
Update middleware 4 years ago
Daniel Supernault 18f3fcc663
Update Laravel 8 => 9 4 years ago
Daniel Supernault 97f3bc571e
Update TrustProxies middleware 4 years ago
Daniel Supernault e6d9437846
Update middleware 5 years ago
Daniel Supernault f37952d6cf
Update verify email screen, add contact admin link 5 years ago
Daniel Supernault f4fc8347c9
Update config() to config_cache() 5 years ago
Daniel Supernault 19d6e7df65
Update middleware, add AccountInterstitial support 6 years ago
Daniel Supernault 27f3b29cf8
Update email confirmation middleware, add 2FA to allow list. Fixes #2385 6 years ago
dx7 f3dba54179
Fix logout link on 2FA verification page 6 years ago
Daniel Supernault 0c82c97069
Added trusted devices to sudo mode 7 years ago
Daniel Supernault 6a16559132
Update DangerZone/Sudo middleware 7 years ago
Daniel Supernault 17c1a83d9e
Add RestrictedAccess middleware for Restricted Mode 7 years ago
Daniel Supernault 026b59f025
Update StatusController 7 years ago
Daniel Supernault d3eaccf706
Update Two factor middleware to allow 3 attempts 7 years ago
Daniel Supernault db3b873a50
Update csrf middleware 7 years ago
Daniel Supernault 29e23d80cb
Update EmailVerificationCheck middleware, allow users to edit email after registration in case of typos 7 years ago
Daniel Supernault 32ef92b917
Add Localization Middleware 8 years ago
Daniel Supernault ef3edc185d
Update 2fa, logout user after two failed attempts 8 years ago
Daniel Supernault 6d890aaf7f
Prepare 2FA 8 years ago
Daniel Supernault d90cfffa3f
Update DangerZone middleware to use session instead of cookie 8 years ago
Daniel Supernault 90fbf8e481
Add DangerZone middleware 8 years ago
daniel b8abbdd90f Apply fixes from StyleCI 8 years ago
Daniel Supernault a2eb1f02ba
Update EmailVerificationCheck middleware 8 years ago
Daniel Supernault 612082d043 Update EmailVerification Middleware
Allow login/logout routes
8 years ago
Daniel Supernault a415b421cb Add Email Verification 8 years ago
Daniel Supernault 05df1c6a5f Add admin middleware 8 years ago
Daniel Supernault a034358c98 Add Laravel Framework 9 years ago