1
0
Fork 0

Merge pull request #4408 from pixelfed/staging

Update login/register views and captcha config, enable login or regis…
This commit is contained in:
daniel 2023-05-23 03:54:25 -06:00 committed by GitHub
commit 9d763bded1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 5 deletions

View File

@ -52,6 +52,7 @@
- Update MediaController, add fallback for local files that are later stored on S3 but still are referenced in cached objects remotely ([4973cb46](https://github.com/pixelfed/pixelfed/commit/4973cb46))
- Update PublicTimelineService, improve warmCache query ([9f901d65](https://github.com/pixelfed/pixelfed/commit/9f901d65))
- Update AP Inbox, fix delete handling ([2800c888](https://github.com/pixelfed/pixelfed/commit/2800c888))
- Update login/register views and captcha config, enable login or register captchas or both ([c071c719](https://github.com/pixelfed/pixelfed/commit/c071c719))
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.6 (2023-05-03)](https://github.com/pixelfed/pixelfed/compare/v0.11.5...v0.11.6)

View File

@ -70,7 +70,7 @@ class LoginController extends Controller
'password' => 'required|string|min:6',
];
if(config('captcha.enabled')) {
if(config('captcha.enabled') || config('captcha.active.login')) {
$rules['h-captcha-response'] = 'required|captcha';
}

View File

@ -137,7 +137,7 @@ class RegisterController extends Controller
'password' => 'required|string|min:'.config('pixelfed.min_password_length').'|confirmed',
];
if(config('captcha.enabled')) {
if(config('captcha.enabled') || config('captcha.active.register')) {
$rules['h-captcha-response'] = 'required|captcha';
}

View File

@ -12,4 +12,9 @@ return [
'attributes' => [
'theme' => 'light'
],
];
'active' => [
'login' => env('CAPTCHA_ENABLED_ON_LOGIN', false),
'register' => env('CAPTCHA_ENABLED_ON_REGISTER', false)
]
];

View File

@ -50,7 +50,7 @@
</div>
</div>
@if(config('captcha.enabled'))
@if(config('captcha.enabled') || config('captcha.active.login'))
<div class="d-flex justify-content-center mb-3">
{!! Captcha::display() !!}
</div>

View File

@ -81,7 +81,7 @@
</div>
</div>
@if(config('captcha.enabled'))
@if(config('captcha.enabled') || config('captcha.active.register'))
<div class="d-flex justify-content-center my-3">
{!! Captcha::display() !!}
</div>