diff --git a/CHANGELOG.md b/CHANGELOG.md index 897cb7226..3121245d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ - Profile pronouns ([fabb57a9](https://github.com/pixelfed/pixelfed/commit/fabb57a9)) - Hashtag timeline api support ([241ae036](https://github.com/pixelfed/pixelfed/commit/241ae036)) - New admin dashboard layout ([eb7d5a4e](https://github.com/pixelfed/pixelfed/commit/eb7d5a4e)) +- Fresh about page layout ([92dc7af6](https://github.com/pixelfed/pixelfed/commit/92dc7af6)) +- Instance Rules ([a4efbb75](https://github.com/pixelfed/pixelfed/commit/a4efbb75)) ### Updated - Updated AdminController, fix variable name in updateSpam method. ([6edaf940](https://github.com/pixelfed/pixelfed/commit/6edaf940)) @@ -95,6 +97,10 @@ - Updated ComposeController, bail on empty attachments. ([061b145b](https://github.com/pixelfed/pixelfed/commit/061b145b)) - Updated landing and about page. ([92dc7af6](https://github.com/pixelfed/pixelfed/commit/92dc7af6)) - Updated AdminStatsService, fix postgres bug. ([af719135](https://github.com/pixelfed/pixelfed/commit/af719135)) +- Updated api, remove auth requirement for hashtag timeline. ([c8e43c60](https://github.com/pixelfed/pixelfed/commit/c8e43c60)) +- Updated NotificationCard component, fix default value. ([78ad4e77](https://github.com/pixelfed/pixelfed/commit/78ad4e77)) +- Updated Timeline component, show counts and make sidebar footer lighter. ([0788bffa](https://github.com/pixelfed/pixelfed/commit/0788bffa)) +- Updated AuthServiceProvider, increase default token + refresh token lifetime. ([178ed63d](https://github.com/pixelfed/pixelfed/commit/178ed63d)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.10.10 (2021-01-28)](https://github.com/pixelfed/pixelfed/compare/v0.10.9...v0.10.10) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 13534549f..a2aa11f98 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -4,55 +4,56 @@ namespace App\Exceptions; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Throwable; +use League\OAuth2\Server\Exception\OAuthServerException; class Handler extends ExceptionHandler { - /** - * A list of the exception types that are not reported. - * - * @var array - */ - protected $dontReport = [ - // - ]; + /** + * A list of the exception types that are not reported. + * + * @var array + */ + protected $dontReport = [ + OAuthServerException::class + ]; - /** - * A list of the inputs that are never flashed for validation exceptions. - * - * @var array - */ - protected $dontFlash = [ - 'password', - 'password_confirmation', - ]; + /** + * A list of the inputs that are never flashed for validation exceptions. + * + * @var array + */ + protected $dontFlash = [ + 'password', + 'password_confirmation', + ]; - /** - * Report or log an exception. - * - * @param \Exception $exception - * - * @return void - */ - public function report(Throwable $exception) - { - parent::report($exception); - } + /** + * Report or log an exception. + * + * @param \Exception $exception + * + * @return void + */ + public function report(Throwable $exception) + { + parent::report($exception); + } - /** - * Render an exception into an HTTP response. - * - * @param \Illuminate\Http\Request $request - * @param \Exception $exception - * - * @return \Illuminate\Http\Response - */ - public function render($request, Throwable $exception) - { - if ($request->wantsJson()) - return response()->json( - ['error' => $exception->getMessage()], - method_exists($exception, 'getStatusCode') ? $exception->getStatusCode() : 500 - ); - return parent::render($request, $exception); - } + /** + * Render an exception into an HTTP response. + * + * @param \Illuminate\Http\Request $request + * @param \Exception $exception + * + * @return \Illuminate\Http\Response + */ + public function render($request, Throwable $exception) + { + if ($request->wantsJson()) + return response()->json( + ['error' => $exception->getMessage()], + method_exists($exception, 'getStatusCode') ? $exception->getStatusCode() : 500 + ); + return parent::render($request, $exception); + } } diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 307bafa64..f48602ae9 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -1988,8 +1988,6 @@ class ApiV1Controller extends Controller */ public function timelineHashtag(Request $request, $hashtag) { - abort_if(!$request->user(), 403); - $this->validate($request,[ 'page' => 'nullable|integer|max:40', 'min_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX, diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index a3230fa0a..1184e6a11 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -26,10 +26,10 @@ class AuthServiceProvider extends ServiceProvider { $this->registerPolicies(); - if(config('pixelfed.oauth_enabled')) { + if(config_cache('pixelfed.oauth_enabled') == true) { Passport::routes(null, ['middleware' => ['twofactor', \Fruitcake\Cors\HandleCors::class]]); - Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration', 15))); - Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration', 30))); + Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration', 356))); + Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration', 400))); Passport::enableImplicitGrant(); if(config('instance.oauth.pat.enabled')) { Passport::personalAccessClientId(config('instance.oauth.pat.id')); @@ -48,8 +48,8 @@ class AuthServiceProvider extends ServiceProvider ]); } - Gate::define('viewWebSocketsDashboard', function ($user = null) { - return $user->is_admin; - }); + // Gate::define('viewWebSocketsDashboard', function ($user = null) { + // return $user->is_admin; + // }); } } diff --git a/resources/assets/js/components/NotificationCard.vue b/resources/assets/js/components/NotificationCard.vue index f44205317..9fe9e3c2f 100644 --- a/resources/assets/js/components/NotificationCard.vue +++ b/resources/assets/js/components/NotificationCard.vue @@ -20,7 +20,7 @@

- {{truncate(n.account.username)}} liked your + {{truncate(n.account.username)}} liked your post. @@ -86,6 +86,12 @@

0 Notifications!

+
+
+

+

No notifications yet

+
+
@@ -253,4 +259,4 @@ } } } - \ No newline at end of file + diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 98ed5633e..c0a3ab5a0 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -355,6 +355,22 @@ --> +
@@ -388,18 +404,17 @@
@@ -898,7 +913,10 @@ }) } ] - } + }, + discover_min_id: 0, + discover_max_id: 0, + discover_feed: [] } },