Skip to content

Commit

Permalink
Merge pull request #5001 from pixelfed/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
dansup committed Mar 10, 2024
2 parents 57f4457 + bf46f6f commit 8aae92d
Show file tree
Hide file tree
Showing 6 changed files with 499 additions and 499 deletions.
10 changes: 5 additions & 5 deletions app/Http/Controllers/Api/ApiV1Dot1Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,15 +473,15 @@ public function inAppRegistrationPreFlightCheck(Request $request)
{
return [
'open' => (bool) config_cache('pixelfed.open_registration'),
'iara' => config('pixelfed.allow_app_registration')
'iara' => (bool) config_cache('pixelfed.allow_app_registration'),
];
}

public function inAppRegistration(Request $request)
{
abort_if($request->user(), 404);
abort_unless(config_cache('pixelfed.open_registration'), 404);
abort_unless(config('pixelfed.allow_app_registration'), 404);
abort_unless((bool) config_cache('pixelfed.open_registration'), 404);
abort_unless((bool) config_cache('pixelfed.allow_app_registration'), 404);
abort_unless($request->hasHeader('X-PIXELFED-APP'), 403);
if(config('pixelfed.bouncer.cloud_ips.ban_signups')) {
abort_if(BouncerService::checkIp($request->ip()), 404);
Expand Down Expand Up @@ -609,8 +609,8 @@ public function inAppRegistrationEmailRedirect(Request $request)
public function inAppRegistrationConfirm(Request $request)
{
abort_if($request->user(), 404);
abort_unless(config_cache('pixelfed.open_registration'), 404);
abort_unless(config('pixelfed.allow_app_registration'), 404);
abort_unless((bool) config_cache('pixelfed.open_registration'), 404);
abort_unless((bool) config_cache('pixelfed.allow_app_registration'), 404);
abort_unless($request->hasHeader('X-PIXELFED-APP'), 403);
if(config('pixelfed.bouncer.cloud_ips.ban_signups')) {
abort_if(BouncerService::checkIp($request->ip()), 404);
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/ProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public function embed(Request $request, $username)
{
$res = view('profile.embed-removed');

if (! config('instance.embed.profile')) {
if (! (bool) config_cache('instance.embed.profile')) {
return response($res)->withHeaders(['X-Frame-Options' => 'ALLOWALL']);
}

Expand Down

0 comments on commit 8aae92d

Please sign in to comment.