Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
47c3ab55
Commit
47c3ab55
authored
May 18, 2021
by
Dominik Hebeler
Browse files
fixed captcha
parent
cc6bddc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/HumanVerification.php
View file @
47c3ab55
...
...
@@ -47,10 +47,11 @@ class HumanVerification extends Controller
if
(
$request
->
getMethod
()
==
'POST'
)
{
\
App\PrometheusExporter
::
CaptchaAnswered
();
$lockedKey
=
$user
[
"lockedKey"
];
$key
=
$request
->
input
(
'captcha'
);
$key
=
strtolower
(
$key
);
if
(
!
$hasher
->
check
(
$key
,
$lockedKey
))
{
$rules
=
[
'captcha'
=>
'required|captcha_api:'
.
$lockedKey
.
',math'
];
$validator
=
validator
()
->
make
(
request
()
->
all
(),
$rules
);
if
(
$validator
->
fails
())
{
$captcha
=
Captcha
::
create
(
"default"
,
true
);
$user
[
"lockedKey"
]
=
$captcha
[
"key"
];
HumanVerification
::
saveUser
(
$user
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment