diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bdf94a2a..adb754bf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,7 @@ - Updated Webfinger, fixes #3050. ([ff7ee3bd](https://github.com/pixelfed/pixelfed/commit/ff7ee3bd)) - Updated status api, autolink caption before returning response. ([b00a453b](https://github.com/pixelfed/pixelfed/commit/b00a453b)) - Updated Timeline, add new ui promo in timelines that can be hidden using localstorage. ([e13959ae](https://github.com/pixelfed/pixelfed/commit/e13959ae)) +- Update FederationController, increase webfinger cache ttl from 12 hours to 14 days. ([745c3580](https://github.com/pixelfed/pixelfed/commit/745c3580)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1) diff --git a/app/Http/Controllers/Admin/AdminReportController.php b/app/Http/Controllers/Admin/AdminReportController.php index 93e759423..acfa17397 100644 --- a/app/Http/Controllers/Admin/AdminReportController.php +++ b/app/Http/Controllers/Admin/AdminReportController.php @@ -500,7 +500,7 @@ trait AdminReportController return $account; }) ->filter(function($res) { - return isset($res['id']); + return $res && isset($res['id']); }) ->values(); } diff --git a/app/Http/Controllers/FederationController.php b/app/Http/Controllers/FederationController.php index bc90737d8..19063c105 100644 --- a/app/Http/Controllers/FederationController.php +++ b/app/Http/Controllers/FederationController.php @@ -58,17 +58,17 @@ class FederationController extends Controller if($cached = Cache::get($key)) { return response()->json($cached, 200, [], JSON_UNESCAPED_SLASHES); } + $domain = config('pixelfed.domain.app'); + abort_if(strpos($resource, $domain) == false, 404); $parsed = Nickname::normalizeProfileUrl($resource); - if(empty($parsed) || $parsed['domain'] !== config('pixelfed.domain.app')) { + if(empty($parsed) || $parsed['domain'] !== $domain) { abort(404); } $username = $parsed['username']; $profile = Profile::whereNull('domain')->whereUsername($username)->firstOrFail(); - if($profile->status != null) { - return ProfileController::accountCheck($profile); - } + abort_if($profile->status != null, 404); $webfinger = (new Webfinger($profile))->generate(); - Cache::put($key, $webfinger, 43200); + Cache::put($key, $webfinger, 1209600); return response()->json($webfinger, 200, [], JSON_UNESCAPED_SLASHES) ->header('Access-Control-Allow-Origin','*'); diff --git a/public/_lang/el.json b/public/_lang/el.json index a56a19fcb..a28e536a0 100644 Binary files a/public/_lang/el.json and b/public/_lang/el.json differ diff --git a/public/_lang/he.json b/public/_lang/he.json index 74e353762..c434c9eb7 100644 Binary files a/public/_lang/he.json and b/public/_lang/he.json differ diff --git a/public/_lang/id.json b/public/_lang/id.json index 92dec492c..37fca65dd 100644 Binary files a/public/_lang/id.json and b/public/_lang/id.json differ diff --git a/public/_lang/ja.json b/public/_lang/ja.json index 6365cdd86..f52fbe6d3 100644 Binary files a/public/_lang/ja.json and b/public/_lang/ja.json differ diff --git a/public/js/spa.js b/public/js/spa.js index 27613dd51..9ca951b4b 100644 Binary files a/public/js/spa.js and b/public/js/spa.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 2846ceab7..cc2b7bfe7 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ diff --git a/resources/assets/js/i18n/el.json b/resources/assets/js/i18n/el.json index a56a19fcb..a28e536a0 100644 --- a/resources/assets/js/i18n/el.json +++ b/resources/assets/js/i18n/el.json @@ -42,7 +42,7 @@ "drive": "\u03a7\u03ce\u03c1\u03bf\u03c2 \u03b1\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7\u03c2", "settings": "\u03a1\u03c5\u03b8\u03bc\u03af\u03c3\u03b5\u03b9\u03c2", "compose": "\u0394\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03bd\u03ad\u03bf\u03c5", - "logout": "Logout", + "logout": "\u0391\u03c0\u03bf\u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03b7", "about": "\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5", "help": "\u0392\u03bf\u03ae\u03b8\u03b5\u03b9\u03b1", "language": "\u0393\u03bb\u03ce\u03c3\u03c3\u03b1", @@ -92,8 +92,8 @@ "editProfile": "\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03a0\u03c1\u03bf\u03c6\u03af\u03bb", "followRequested": "\u0391\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03ae\u03c3\u03c4\u03b5 \u03a4\u03bf \u0391\u03af\u03c4\u03b7\u03bc\u03b1", "joined": "Joined", - "emptyCollections": "We can't seem to find any collections", - "emptyPosts": "We can't seem to find any posts" + "emptyCollections": "\u0394\u03b5\u03bd \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03b2\u03c1\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c5\u03bb\u03bb\u03bf\u03b3\u03ad\u03c2", + "emptyPosts": "\u0394\u03b5\u03bd \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03b2\u03c1\u03bf\u03cd\u03bc\u03b5 \u03b4\u03b7\u03bc\u03bf\u03c3\u03b9\u03b5\u03cd\u03c3\u03b5\u03b9\u03c2" }, "menu": { "viewPost": "\u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03b7 \u0394\u03b7\u03bc\u03bf\u03c3\u03af\u03b5\u03c5\u03c3\u03b7\u03c2", @@ -145,6 +145,6 @@ "peopleYouMayKnow": "\u0386\u03c4\u03bf\u03bc\u03b1 \u03c0\u03bf\u03c5 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03be\u03ad\u03c1\u03b5\u03c4\u03b5" }, "hashtags": { - "emptyFeed": "We can't seem to find any posts for this hashtag" + "emptyFeed": "\u0394\u03b5\u03bd \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03b2\u03c1\u03bf\u03cd\u03bc\u03b5 \u03b4\u03b7\u03bc\u03bf\u03c3\u03b9\u03b5\u03cd\u03c3\u03b5\u03b9\u03c2 \u03b3\u03b9\u03b1 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf hashtag" } } \ No newline at end of file diff --git a/resources/assets/js/i18n/he.json b/resources/assets/js/i18n/he.json index 74e353762..c434c9eb7 100644 --- a/resources/assets/js/i18n/he.json +++ b/resources/assets/js/i18n/he.json @@ -42,7 +42,7 @@ "drive": "\u05db\u05d5\u05e0\u05df (\u05d3\u05e8\u05d9\u05d9\u05d1)", "settings": "\u05d4\u05d2\u05d3\u05e8\u05d5\u05ea", "compose": "\u05e6\u05e8\u05d5 \u05d7\u05d3\u05e9", - "logout": "Logout", + "logout": "\u05d4\u05ea\u05e0\u05ea\u05e7/\u05d9", "about": "\u05d0\u05d5\u05d3\u05d5\u05ea", "help": "\u05e2\u05d6\u05e8\u05d4", "language": "\u05e9\u05e4\u05d4", diff --git a/resources/assets/js/i18n/id.json b/resources/assets/js/i18n/id.json index 92dec492c..37fca65dd 100644 --- a/resources/assets/js/i18n/id.json +++ b/resources/assets/js/i18n/id.json @@ -42,7 +42,7 @@ "drive": "Perangkat Keras", "settings": "Pengaturan", "compose": "Membuat baru", - "logout": "Logout", + "logout": "Keluar", "about": "Tentang", "help": "Bantuan", "language": "Bahasa", diff --git a/resources/assets/js/i18n/ja.json b/resources/assets/js/i18n/ja.json index 6365cdd86..f52fbe6d3 100644 --- a/resources/assets/js/i18n/ja.json +++ b/resources/assets/js/i18n/ja.json @@ -42,7 +42,7 @@ "drive": "\u30c9\u30e9\u30a4\u30d6", "settings": "\u8a2d\u5b9a", "compose": "\u65b0\u898f\u6295\u7a3f", - "logout": "Logout", + "logout": "\u30ed\u30b0\u30a2\u30a6\u30c8", "about": "\u3053\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u3064\u3044\u3066", "help": "\u30d8\u30eb\u30d7", "language": "\u8a00\u8a9e", diff --git a/resources/lang/el/web.php b/resources/lang/el/web.php index 6fbcb0f1e..a92b7e6fa 100644 --- a/resources/lang/el/web.php +++ b/resources/lang/el/web.php @@ -55,7 +55,7 @@ return [ 'drive' => 'Χώρος αποθήκευσης', 'settings' => 'Ρυθμίσεις', 'compose' => 'Δημιουργία νέου', - 'logout' => 'Logout', + 'logout' => 'Αποσύνδεση', // Nav footer 'about' => 'Σχετικά με', @@ -118,8 +118,8 @@ return [ 'followRequested' => 'Ακολουθήστε Το Αίτημα', 'joined' => 'Joined', - 'emptyCollections' => 'We can\'t seem to find any collections', - 'emptyPosts' => 'We can\'t seem to find any posts', + 'emptyCollections' => 'Δεν μπορούμε να βρούμε συλλογές', + 'emptyPosts' => 'Δεν μπορούμε να βρούμε δημοσιεύσεις', ], 'menu' => [ @@ -180,7 +180,7 @@ return [ ], 'hashtags' => [ - 'emptyFeed' => 'We can\'t seem to find any posts for this hashtag' + 'emptyFeed' => 'Δεν μπορούμε να βρούμε δημοσιεύσεις για αυτό το hashtag' ], ]; diff --git a/resources/lang/he/web.php b/resources/lang/he/web.php index 08a3f88e0..12d18e168 100644 --- a/resources/lang/he/web.php +++ b/resources/lang/he/web.php @@ -55,7 +55,7 @@ return [ 'drive' => 'כונן (דרייב)', 'settings' => 'הגדרות', 'compose' => 'צרו חדש', - 'logout' => 'Logout', + 'logout' => 'התנתק/י', // Nav footer 'about' => 'אודות', diff --git a/resources/lang/id/web.php b/resources/lang/id/web.php index 0889b324e..be72512e7 100644 --- a/resources/lang/id/web.php +++ b/resources/lang/id/web.php @@ -55,7 +55,7 @@ return [ 'drive' => 'Perangkat Keras', 'settings' => 'Pengaturan', 'compose' => 'Membuat baru', - 'logout' => 'Logout', + 'logout' => 'Keluar', // Nav footer 'about' => 'Tentang', diff --git a/resources/lang/ja/web.php b/resources/lang/ja/web.php index 5c5567dfc..430ae1201 100644 --- a/resources/lang/ja/web.php +++ b/resources/lang/ja/web.php @@ -55,7 +55,7 @@ return [ 'drive' => 'ドライブ', 'settings' => '設定', 'compose' => '新規投稿', - 'logout' => 'Logout', + 'logout' => 'ログアウト', // Nav footer 'about' => 'このサーバーについて',