Commit Graph

92 Commits (40829a417b7f06081493bd550aed2d7bb19f1f82)

Author SHA1 Message Date
Your Name ab972559ea lint 6 days ago
Your Name 28b11b9b35 Larastan 2 6 days ago
Your Name 47c29fe410 lint 6 days ago
Your Name 33a6c642ea Larastan 1 to 2 6 days ago
Your Name 6beab304a0 lint 6 days ago
Your Name 0435d08568 RemoveAlwaysElseRector 6 days ago
Your Name 0dbd78ca8e Lint 6 days ago
Your Name 5ebc1af91e BATCH 1 6 days ago
Your Name afe2bb6d1d polish 1 week ago
Your Name abb2d8e5e9 polish 1 week ago
Your Name 163cd9f589 polish 1 week ago
Your Name e3b6cebf27 Fix MariaDB driver detection and reblog caption null inserts
Laravel 11 exposes MariaDB as a dedicated 'mariadb' driver, so
config('database.default') === 'mysql' checks silently misclassified
MariaDB as the non-mysql (postgres) branch.

- Add App\Util\Database\DatabaseDriver with isMysqlLike()/isPgsql()
  plus db_is_mysql_like()/db_is_pgsql() global helpers.
- Route all database.default driver checks through the helpers so
  MySQL and MariaDB are treated as one group.
- Use '' (not null) for share/compose caption+rendered, valid whether
  the column is nullable or NOT NULL (it is NOT NULL on MySQL/MariaDB).
- Guard pgsql strtolower() in registration against missing fields.
- Scope CustomEmoji::duplicateShortcodes to the grouped column for
  Postgres GROUP BY validity.
- Remove stale Postgres guard in status:dedup; use havingRaw for
  cross-driver HAVING.
1 week ago
Daniel Supernault a27033d2fd
Update LoginController 1 week ago
Daniel Supernault 538a11cccd
Update LoginController 1 week ago
Your Name ce073ffc92 Merge remote-tracking branch 'origin/staging' into feature/honeypot-spam-protection
# Conflicts:
#	routes/web.php
2 weeks ago
Your Name 10559c23e3 Fix larastan noAuthFacadeInRequestScope in LoginController
Replace Auth::check() with $request->user() !== null in confirmEmail(),
which already has the request in scope, and drop the now-unused Auth
facade import. Resolves the 2 remaining project-wide larastan errors.
2 weeks ago
Daniel Supernault 194c881cb2
Update ResetPasswordController 2 weeks ago
Daniel Supernault 1d96c94054
Refactor Auth, remove expensive middleware 2 weeks ago
Your Name afcb68c183 Fix registration form redirecting when max_users is falsy 2 weeks ago
Your Name ce4343e3e2 Replace custom register token with spatie/laravel-honeypot
Swap the custom 'rt' register token anti-spam mechanism for
spatie/laravel-honeypot on the registration and parental-controls
invite flows.

- Add spatie/laravel-honeypot and publish config/honeypot.php
- Remove getRegisterToken() and the rt validation rule from RegisterController
- Replace the rt hidden field with the @honeypot directive in both forms
- Attach ProtectAgainstSpam middleware to POST /register and the
  parental-controls invite register route
- Update RegisterTest to disable honeypot for the valid registration case
2 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
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
Daniel Supernault 33dce75f2c
Pint app/ 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 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
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 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
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
Daniel Supernault ef6187b917
Fix LoginController 9 months ago
Daniel Supernault 34278c77c2
Update LoginController 9 months ago
Daniel Supernault 374344754e
Lint 9 months ago
Shlee b826f4fe48
Update ForgotPasswordController.php 11 months ago
Shlee 4adc8947d8
Update ResetPasswordController.php 11 months ago
Daniel Supernault 4960421073
Update CuratedOnboarding, add new app:curated-onboarding command, extend email verification window to 7 days and fix resend verification mails 2 years ago
Daniel Supernault 207bb36c89
Increase username length limit from 15 to 30 2 years ago
Daniel Supernault dd6e3cc290
Update RegisterController, update username constraints, require atleast one alpha char 2 years ago
Daniel Supernault 8a89e3c963
Update captcha, use config_cache helper 3 years ago
Daniel Supernault 8dac2caf1d
Add Curated Onboarding 3 years ago
Daniel Supernault 0325e17115
Update LoginController, fix captcha validation error message 3 years ago
Daniel Supernault c53894fe16
Add Parental Controls feature 3 years ago
Daniel Supernault a6d10f0389
Update RegisterController 3 years ago
Daniel Supernault 221ddce0fa
Update login form, allow admins to enable captcha after X failed attempts. Admins can set the number of attempts before captcha is shown, default is 2 attempts before captcha is required 3 years ago
Daniel Supernault c071c7195e
Update login/register views and captcha config, enable login or register captchas or both 3 years ago
Daniel Supernault 0ab5b96a00
Update ResetPasswordController, add captcha support, improve security and a new redesigned view 3 years ago
Daniel Supernault f6e7ff649e
Update ForgotPasswordController, add captcha support, improve security and a new redesigned view 3 years ago
Daniel Supernault 1bbee6d07b
Update RegisterController, improve max_users calculation and add kb page to redirect to if conditions are met 3 years ago
Robert von Burg 7e8938d749
[Fix] Don't count inactive accounts for registration blocking 3 years ago