Commit Graph

13149 Commits (1d712e14782eb08efa3be0c343d3544a46e7b37c)
 

Author SHA1 Message Date
Shlee 1d712e1478
Update default mailer configuration to use MAIL_DRIVER 3 weeks ago
Shlee 690d710693
Update database.php 3 weeks ago
Shlee 5383c2ecc9
Update cache.php 3 weeks ago
Shlee ab2447b0f4
Update session.php 3 weeks ago
Shlee 0200c9e0cd
Change default log stack from 'single' to 'daily' 3 weeks ago
Shlee fff81fe596
Update broadcasting.php 3 weeks ago
Shlee 15d30f803d
Update cache.php 3 weeks ago
Shlee 1b034aa429
Update session.php 3 weeks ago
Shift c81c4be683 Default config files
In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used.
3 weeks ago
Shlee 802db3791d
Merge pull request #7056 from pixelfed/shleeable-patch-2
Update Localization.php
3 weeks ago
Shlee 7cf6e77148
Update Localization.php 3 weeks ago
Shlee 7ccf682faa
Merge pull request #7053 from pixelfed/chore/move-lang-to-toplevel
chore: move resources/lang to top-level lang/ per Laravel 9+ convention
3 weeks ago
Your Name 24fd8c5cbb polish 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
Shlee f09e882a34
Merge pull request #7052 from pixelfed/fix/media-storage-env-no-dotenv-file
Add per-file transfer output and --debug detail to MediaMoveStorageLo…
3 weeks ago
Your Name b8ca4da3a6 Add per-file transfer output and --debug detail to MediaMoveStorageLocalToCloud 3 weeks ago
Shlee ad5ab1535f
Merge pull request #7050 from pixelfed/fix/media-storage-env-no-dotenv-file
Fix media storage migration crash when no .env file exists
3 weeks ago
Your Name 6b14b229d1 Fix media storage migration crash when no .env file exists
The media storage migration commands read/parsed the .env file directly to
check and flip PF_ENABLE_CLOUD. In containerized deploys there is no .env on
disk (config is injected via env vars), so updateEnvFile() threw
'file_get_contents(.env): Failed to open stream' and the scheduled command
exited 1.

- Check the live setting via config_cache('pixelfed.cloud_storage') like the
  rest of the app, instead of parsing .env.
- Make the .env write best-effort in ManagesMediaStorageEnv: skip gracefully
  when the file is missing or read-only, and still apply the runtime + DB
  config-cache updates (the load-bearing changes on a hot server).
- Apply the same fix to the sibling unstable:MediaMoveStorageCloudToLocal.
- Add a regression test covering the no-.env container scenario.
3 weeks ago
Shlee 2c0ba48b86
Merge pull request #7046 from pixelfed/dependabot/npm_and_yarn/svgo-2.8.4
chore(deps): bump svgo from 2.8.2 to 2.8.4
3 weeks ago
Shlee 6050853f4f
Merge pull request #7047 from pixelfed/dependabot/npm_and_yarn/body-parser-1.20.6
chore(deps): bump body-parser from 1.20.5 to 1.20.6
3 weeks ago
Shlee e6a317127f
Merge pull request #7049 from pixelfed/fix/larastan-notification-status-import
Fix Larastan error: correct Status import in NotificationService
3 weeks ago
Your Name ef7e485e7d Fix Larastan error: correct Status import in NotificationService
Use App\Models\Status instead of the non-existent App\Status class.
3 weeks ago
dependabot[bot] 50ea4a9b46
chore(deps): bump body-parser from 1.20.5 to 1.20.6
Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.20.5 to 1.20.6.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.20.5...1.20.6)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-version: 1.20.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks ago
dependabot[bot] 55b932d777
chore(deps): bump svgo from 2.8.2 to 2.8.4
Bumps [svgo](https://github.com/svg/svgo) from 2.8.2 to 2.8.4.
- [Release notes](https://github.com/svg/svgo/releases)
- [Commits](https://github.com/svg/svgo/compare/v2.8.2...v2.8.4)

---
updated-dependencies:
- dependency-name: svgo
  dependency-version: 2.8.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks ago
Shlee 003953eb3e
Merge pull request #7045 from pixelfed/perf/follower-service-following-ids
Deduplocation: add FollowerService::getFollowingIds for common function
3 weeks ago
dansup 1b91af4781
Merge pull request #7033 from pixelfed/staging
Staging
3 weeks ago
Daniel Supernault c9b0ee3bdd
Refactor NotificationService 3 weeks ago
Shlee 9c7c33969a
Merge pull request #7044 from pixelfed/perf/delete-jobs-streaming
Stream deletions with cursor and batch notification lookups in delete jobs
3 weeks ago
Your Name 667f6e2fc9 Extract following-ids lookup into FollowerService::getFollowingIds
The Cache::remember('profile:following:'.$pid, ...) block that plucks
following_id and appends the caller's own id was copy-pasted across four
call sites, with inconsistent TTLs (1440 minutes vs 1209600 seconds).

Add FollowerService::getFollowingIds($pid), which owns the cache key that
add()/remove() already invalidate, and use it from InternalApiController,
PublicApiController, ApiV1Controller and HashtagUnfollowPipeline. Removes
the now-unused Follower/Cache imports left behind.

Adds a test covering the followed-ids-plus-self result and the
follows-nobody case.
3 weeks ago
Shlee ed07f9bfec
Merge pull request #7042 from pixelfed/chore/remove-dead-debug-methods
Remove dead debug methods that echoed the raw request
3 weeks ago
Your Name c4e5b96d25 Stream deletions with cursor and batch notification lookups in delete jobs
The status- and account-deletion jobs loaded whole collections with
->get() and then looped, running a per-row Notification lookup inside
each iteration.

- StatusDelete / RemoteStatusDelete: resolve associated DirectMessage and
  MediaTag ids, fetch their notifications in a single whereIn query,
  clear each via cursor (NotificationService::del must run per row for
  cache/redis cleanup), then bulk delete the DMs and media tags.
- DeleteAccountPipeline / DeleteRemoteProfilePipeline: stream Story and
  Collection deletions with cursor() instead of loading every row into
  memory. Per-row file unlink and item deletes are preserved.

Adds StatusDeleteCleanupTest covering DM + notification cleanup, media
tag + notification cleanup, and the no-associations case.
3 weeks ago
Your Name 661b841428 Remove dead debug methods that echoed the raw request
CollectionController::index and StoryComposeController::createPoll had no
route mapping and simply returned $request->all(). Both are unreachable
debug leftovers; remove them. The live poll route maps to
ComposeController::createPoll, which is unaffected.
3 weeks ago
Shlee bd6dfcc28e
Merge pull request #7039 from pixelfed/refactor/dedupe-query-patterns
Extract duplicated blocked-id and duplicate-shortcode query patterns
3 weeks ago
Your Name e4e12fad7c Extract duplicated blocked-id and duplicate-shortcode query patterns
Two query patterns were copy-pasted across several call sites:

- The 'users who blocked me, plus myself' list used to filter profile
  search (UserFilter::whereFilterableId($pid)->pluck('user_id')->push($pid))
  appeared in ComposeController (x2) and DirectMessageController. Extracted
  to UserFilterService::searchExcludedProfileIds(). Note this is the
  inverse of blocks() (who I blocked), so it is a distinct method.

- CustomEmoji duplicate detection (groupBy('shortcode')->havingRaw(
  'count(*) > 1')) appeared three times in AdminController. Extracted to a
  CustomEmoji::duplicateShortcodes() query scope.

Adds tests for both. No behaviour change.
3 weeks ago
Shlee 7ad550d2f7
Merge pull request #7037 from pixelfed/perf/seasonal-sql-aggregation
Compute Year-in-Review averages in SQL instead of in PHP
3 weeks ago
Your Name cd873c8976 Compute Year-in-Review averages in SQL instead of in PHP
SeasonalController::getData computed the average posts/likes per profile
by grouping in SQL, then pulling every grouped row into a collection and
calling ->pluck('count')->avg() in PHP. This loaded one row per profile
into memory just to average.

Wrap the grouped per-profile counts in a subquery and let the database
compute AVG(count), returning a single value. Also drops the invalid
SELECT * with GROUP BY (ONLY_FULL_GROUP_BY) by selecting count(*) only.

Adds a test verifying the average-of-per-profile-counts and its
exclusions (remote, wrong type, out-of-range date), plus the empty case.
3 weeks ago
Shlee 660880eac7
Merge pull request #7036 from pixelfed/fix/remote-auth-http-timeout
Add timeout, retry and error handling to remote auth HTTP calls
3 weeks ago
Your Name 2ad6e28318 Add timeout, retry and error handling to remote auth HTTP calls
RemoteAuthService::getVerifyCredentials, getFollowing and getToken made
outbound HTTP requests to a user-controlled remote instance during the
Mastodon login flow with no timeout, no retry and no exception handling.
A slow or hostile instance could hang the request or surface an uncaught
exception.

Wrap all three in timeout(20)->retry(3, 750) with try/catch that returns
false on failure, matching the existing pattern in isDomainCompatible().
Callers already treat a falsy return as a failure; add the missing guard
at the one verify_credentials call site that accessed the result array
without checking it first.

Adds RemoteAuthServiceTest covering connection failure, server error and
success paths.
3 weeks ago
Shlee 46580f3635
Merge pull request #7035 from pixelfed/fix/dm-read-bulk-update
Mark direct messages read with a single bulk update
3 weeks ago
Your Name fbfd26d775 Mark direct messages read with a single bulk update
DirectMessageController@read fetched every matching DirectMessage and
saved each one individually in a loop, issuing one UPDATE per row. On an
active thread this is N queries.

Pluck the matching ids and perform a single bulk update, preserving the
existing response (the list of affected message ids) and updated_at
behaviour.

Adds regression tests covering the marked-read ids, the status_id lower
bound, and sender isolation.
3 weeks ago
Shlee 7b7392dcaf
Merge pull request #7034 from pixelfed/fix/avatar-upload-silent-failure
Fix silent failure in avatar upload endpoints
3 weeks ago
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
Shlee 2486817b78
Merge pull request #7024 from pixelfed/dependabot/npm_and_yarn/staging/blurhash-2.0.5
chore(deps)(deps): bump blurhash from 1.1.5 to 2.0.5
3 weeks ago
Shlee b130ef2bf3
Merge pull request #7013 from pixelfed/dependabot/npm_and_yarn/ip-address-10.7.0
chore(deps): bump ip-address from 10.2.0 to 10.7.0
3 weeks ago
Shlee b8e04e2038
Merge pull request #7010 from pixelfed/dependabot/npm_and_yarn/multi-c845c5b3f5
chore(deps): bump postcss-selector-parser
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
dependabot[bot] f428ff6fb5
chore(deps)(deps): bump blurhash from 1.1.5 to 2.0.5
Bumps [blurhash](https://github.com/woltapp/blurhash) from 1.1.5 to 2.0.5.
- [Commits](https://github.com/woltapp/blurhash/commits)

---
updated-dependencies:
- dependency-name: blurhash
  dependency-version: 2.0.5
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks ago
dansup 481ad0b57e
Merge pull request #7021 from pixelfed/staging
Staging
3 weeks ago
Daniel Supernault 9e33bed630
Add only_reposts 3 weeks ago
Shlee 6fa09e4b42
Merge pull request #7014 from pixelfed/dependabot/npm_and_yarn/browserslist-4.28.8
chore(deps): bump browserslist from 4.28.2 to 4.28.8
3 weeks ago