Commit Graph

3237 Commits (e18475f9d0bb1860863e7154ae16fde5b1ac2a0f)

Author SHA1 Message Date
Your Name 566c5503d3 polish 1 week ago
Your Name abb2d8e5e9 polish 1 week ago
Your Name 163cd9f589 polish 1 week ago
Daniel Supernault 4053439e7a
Update i18n 1 week ago
Daniel Supernault 075aa781a3
Build compiled assets 1 week ago
Your Name a14fba166f Fix cached-page 500s and flaky smoke/API tests
- terms/privacy/community-guidelines views accessed the cached page as an
  object ($page->title), but cachedPage() returns an array, causing a 500
  whenever a custom Page row existed. Switch to array access.
- PublicRouteSmokeTest: enable open_registration before hitting /register,
  which 404s by default when registration is disabled.
- Api/AccountTest: derive sanctum.stateful domain from app.url instead of
  hardcoding pixelfed.test, so the first-party auth test is environment
  independent.
1 week ago
Your Name f4dbddd8b5 Use locale_get_display_name for language labels
locale_get_display_language reads only the language subtag and ignores
the region, so zh-cn and zh-tw both rendered as 'Chinese - 中文'.
Switching to locale_get_display_name disambiguates region variants
(Chinese (China) / Chinese (Taiwan)) while leaving all region-less
locales unchanged.

Updated the settings language dropdown and the /i/lang picker.
1 week ago
Arnaud 6537787c4e More translatable strings : landing, privacy policy, terms 1 week ago
Arnaud ac790b1d8a Fix last untranslated strings on the login + explore pages 1 week ago
Arnaud 443962c92b Make the landing page translatable 1 week ago
Shlee 2f9f8ecd1b
Merge pull request #7244 from pixelfed/fix/curated-register-details-xss
Escape message in curated register details email to fix reflected XSS
1 week ago
Daniel Supernault 1cead5cf60
Update in-app registration 1 week ago
Your Name 623f03bb68 Escape message in curated register details email to fix reflected XSS 1 week ago
Your Name 9d839f7b5a Fix missing email verification dispatch on settings email change 2 weeks ago
Your Name ce073ffc92 Merge remote-tracking branch 'origin/staging' into feature/honeypot-spam-protection
# Conflicts:
#	routes/web.php
2 weeks ago
Daniel Supernault 1d96c94054
Refactor Auth, remove expensive middleware 2 weeks ago
Your Name 4df40cb772 Escape user-provided content in curated register admin emails 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
Daniel Supernault d7cfd07204
Fix PostEditModal. Closes #7084 2 weeks ago
Shlee b1422f7a6a
Merge pull request #7063 from pixelfed/chore/rename-bootstrap3-pagination
Laravel 13 Prep: Rename Bootstrap 3 pagination templates
3 weeks ago
Shift 938f0cf205 Rename Bootstrap 3 pagination templates 3 weeks ago
Your Name 042ab0a6e4 Convert optional() to nullsafe operator
Applies patch 2/21 from pixelfed-staging PR #9: replaces optional($x)->y
with $x?->y across 16 files. Pint-clean.
3 weeks ago
Your Name 9db2218ca6 chore: move resources/lang to top-level lang/ per Laravel 9+ convention
- Relocate translation files from resources/lang to lang/ via git mv
- Update PHP references to use the lang_path() helper
- Update crowdin.yml source/translation paths
- Update phpstan.neon translationDirectories
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 aa9bb868dd fix: emoji admin URLs and cloud-migration guard
Two issues prevented emoji from serving/migrating correctly on cloud:

- Admin custom-emoji views hardcoded url('storage/'.media_path), so they
  always showed local URLs and bypassed cloud resolution. Use $emoji->url().
- The migration/command guard relied solely on config_cache('pixelfed.cloud_storage'),
  which is DB/12h-cached and can read stale-false right after cloud is
  enabled, causing the migration to silently no-op. Treat cloud as enabled
  when either live config() or config_cache() is true.
4 weeks ago
Daniel Supernault 32ff6d48cd
Update Profile component 4 weeks ago
Your Name b3be61c47c Fix VueIntersect single-element warning in notifications section
The <intersect> in sections/Notifications.vue wrapped four <placeholder>
elements directly. vue-intersect requires exactly one child (it checks
$slots.default.length and observes $slots.default[0]), so it logged
'[VueIntersect] You may only wrap one element in a <intersect> component.'
and only observed the first placeholder. Wrap the placeholders in a single
<div> so the slot has one root element.
4 weeks ago
Shlee fc89c156b1
Merge pull request #6919 from pixelfed/fix/csrf-token-guest-pages
Fix CSRF token not found error on guest pages (login/register)
4 weeks ago
Your Name ea1a629b1a Add csrf-token meta to anon and app-guest layouts
These guest layouts also load app.js, which reads the csrf-token meta
tag to set the axios X-CSRF-TOKEN header. Without it, they logged the
same 'CSRF token not found' console error and had no CSRF header for
AJAX requests. Adds the meta tag to match the other layouts.
4 weeks ago
Your Name 32e391d267 Fix CSRF token not found error on guest pages (login/register)
The app layout renders separate head blocks for auth vs guest users.
The guest block was missing the <meta name="csrf-token"> tag that
app.js reads to set the axios X-CSRF-TOKEN header, causing a console
error on the login and register pages. Add the meta tag to the guest
head to match the authenticated head block.
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
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
Daniel Supernault 5b63f5f225
Fix AdminReports 4 weeks ago
Your Name 26b8a0a6b0 fix: replace deprecated starts_with() with str_starts_with()
The starts_with() helper was removed in Laravel 6. Use PHP 8's native
str_starts_with() instead.
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
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
Shlee 559db5d73e
Merge pull request #6825 from pixelfed/fix/blade-test-str-random
fix: replace deprecated str_ helpers in Blade templates and tests
4 weeks ago
Your Name 30db57448f fix: replace str_random/str_limit/str_slug in Blade templates and tests
These deprecated helpers will throw 'undefined function' errors at
runtime since laravel/helpers was removed. Replace with Str::random(),
Str::limit(), and Str::slug() respectively.
4 weeks ago
Daniel Supernault b761107c71
Update ContextMenu, restore Edit button 4 weeks ago
Shlee 80271c9002
Update Clients.vue 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 f2a019744c
Merge pull request #6776 from pixelfed/fix/oauth-client-secret-display-6630
Fix: OAuth client secret not displayed after creation
4 weeks ago
Shlee b478092668
Merge pull request #6775 from pixelfed/fix/upload-error-messages-6657
Fix: Show detailed upload error messages instead of generic error
4 weeks ago
Your Name 78b2bc3235 Apply pint formatting to resources/ 4 weeks ago
Your Name e0fc6c7773 Merge remote-tracking branch 'origin/staging' into pint/resources
# Conflicts:
#	resources/lang/es/auth.php
#	resources/lang/es/web.php
#	resources/lang/fr/site.php
#	resources/lang/oc/web.php
#	resources/lang/pt/web.php
#	resources/lang/zh/web.php
4 weeks ago
Shlee 24e22b7cad
Merge pull request #6567 from arnaud-jacquemin/feature/french-translation
French translation of the site pages
4 weeks ago
Shlee adee14a3a0
Merge pull request #6575 from pixelfed/l10n_staging
New Crowdin updates
4 weeks ago
Shlee 8b64e857a7
Merge pull request #6624 from raymundovr/feat/es-translation
Spanish translations
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 655d71ba5c Fix OAuth client secret not displayed after creation
Fixes #6630 (partial — client secret issue)

In Passport v13, client secrets are hashed at the model level and only
available as plain_secret on the response from the creation endpoint.
The previous code immediately re-fetched the client list after creation,
losing the plain secret since it's not stored or returned on GET.

Changes:
- Capture plain_secret from the POST response
- Show a dedicated modal with the client ID and secret after creation
- Warn users to copy the secret immediately (it won't be shown again)
- Add a Copy button for convenience
- Show 'Hidden (only shown at creation)' in the table for existing clients
4 weeks ago