Merge pull request #6083 from pixelfed/staging

Staging
dev
(dan)iel (sup)ernault 1 month ago committed by GitHub
commit 5921c51db9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -10,10 +10,13 @@
<a href="https://packagist.org/packages/pixelfed/pixelfed"><img src="https://poser.pugx.org/pixelfed/pixelfed/v/stable.svg" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/pixelfed/pixelfed"><img src="https://poser.pugx.org/pixelfed/pixelfed/license.svg" alt="License"></a>
<a title="Crowdin" target="_blank" href="https://crowdin.com/project/pixelfed"><img src="https://badges.crowdin.net/pixelfed/localized.svg"></a>
<a href="https://fedidb.org/software/pixelfed"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.fedidb.org%2Fv1%2Fsoftware%2Fpixelfed&query=%24.user_count&logo=pixelfed&logoColor=white&label=Total%20Users" alt="Total Pixelfed users from FediDB" /></a>
</p>
<p align="center">
<a href="https://fedidb.org/software/pixelfed"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.fedidb.org%2Fv1%2Fsoftware%2Fpixelfed&query=%24.user_count&logo=pixelfed&logoColor=white&label=Total%20Users" alt="Total Pixelfed users from FediDB" /></a>
<a target="_blank" href="https://discord.gg/msXs3MumsK"><img src="https://dcbadge.limes.pink/api/server/https://discord.gg/msXs3MumsK" alt="" /></a>
</p>
</p>
## Introduction

@ -2,8 +2,9 @@
namespace App\Http\Middleware;
use App, Auth, Closure;
use Auth;
use Carbon\Carbon;
use Closure;
class DangerZone
{
@ -16,25 +17,34 @@ class DangerZone
*/
public function handle($request, Closure $next)
{
if( $request->session()->get('sudoModeAttempts') > 3) {
if (config('remote-auth.oidc.enabled')) {
// Skip for OIDC/LDAP
return $next($request);
}
if ($request->session()->get('sudoModeAttempts') > 3) {
$request->session()->pull('redirectNext');
$request->session()->pull('sudoModeAttempts');
Auth::logout();
return redirect(route('login'));
}
if(!Auth::check()) {
}
if (! Auth::check()) {
return redirect(route('login'));
}
if(!$request->is('i/auth/sudo') && $request->session()->get('sudoTrustDevice') != 1) {
if( !$request->session()->has('sudoMode') ) {
if (! $request->is('i/auth/sudo') && $request->session()->get('sudoTrustDevice') != 1) {
if (! $request->session()->has('sudoMode')) {
$request->session()->put('redirectNext', $request->url());
return redirect('/i/auth/sudo');
}
if( $request->session()->get('sudoMode') < Carbon::now()->subMinutes(30)->timestamp ) {
}
if ($request->session()->get('sudoMode') < Carbon::now()->subMinutes(30)->timestamp) {
$request->session()->put('redirectNext', $request->url());
return redirect('/i/auth/sudo');
}
}
}
return $next($request);
}
}

595
composer.lock generated

File diff suppressed because it is too large Load Diff

@ -275,7 +275,7 @@
hide-footer
centered
body-class="p-0 ui-menu"
title="$t('navmenu.appearance')">
:title="$t('navmenu.appearance')">
<div class="list-group list-group-flush">
<div class="list-group-item px-3">
<div class="d-flex justify-content-between align-items-center">

@ -3,7 +3,7 @@
return [
'common' => [
'comment' => 'Comment',
'comment' => 'Kommentér',
'commented' => 'Kommenterede',
'comments' => 'Kommentarer',
'like' => 'Synes om',
@ -13,7 +13,7 @@ return [
'shared' => 'Delt',
'shares' => 'Delinger',
'unshare' => 'Fjern deling',
'bookmark' => 'Bookmark',
'bookmark' => 'Bogmærk',
'cancel' => 'Annuller',
'copyLink' => 'Kopier link',
@ -133,11 +133,11 @@ return [
'viewProfile' => 'Se profil',
'moderationTools' => 'Moderatorværktøjer',
'report' => 'Report',
'archive' => 'Archive',
'unarchive' => 'Unarchive',
'embed' => 'Embed',
'archive' => 'Arkivér',
'unarchive' => 'Anuller arkivering',
'embed' => 'Indlejr',
'selectOneOption' => 'Select one of the following options',
'selectOneOption' => 'Vælg en af følgende muligheder',
'unlistFromTimelines' => 'Skjul fra tidslinje',
'addCW' => 'Tilføj indholdsadvarsel',
'removeCW' => 'Fjern indholdsadvarsel',

@ -12,7 +12,7 @@
placeholder="username"
aria-label="Your username"
aria-describedby="username-addon"
maxlength="15"
maxlength="30"
required
name="username"
value="{{ request()->session()->get('cur-reg.form-username') }}">
@ -20,7 +20,7 @@
<span class="input-group-text bg-dark border-dark text-muted font-weight-bold" id="username-addon">&commat;{{ config('pixelfed.domain.app') }}</span>
</div>
</div>
<p class="help-text small text-muted mb-0">You can use letters, numbers, and underscores with a max length of 15 chars.</p>
<p class="help-text small text-muted mb-0">You can use letters, numbers, and underscores with a max length of 30 chars.</p>
</div>
<div class="details-form-field">

@ -8,11 +8,11 @@
Two factor authentication is not enabled yet.
</p>
<p class="text-muted">
Two-factor authentication adds an additional layer of security to your account by requiring more than just a password to log in. <a href="#">Learn more</a>.
Two-factor authentication adds an additional layer of security to your account by requiring more than just a password to log in.
</p>
<p class="mb-0">
<a class="btn btn-success font-weight-bold" href="{{route('settings.security.2fa.setup')}}">Enable two-factor authentication</a>
</p>
</div>
</li>
</ul>
</ul>

Loading…
Cancel
Save