Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
captcha
Commits
294c1a23
Commit
294c1a23
authored
Aug 15, 2018
by
elachlan
Browse files
Issue #2992697 by elachlan: Testing failing on 8.x Branch
parent
e8ea6872
Changes
1
Hide whitespace changes
Inline
Side-by-side
captcha.module
View file @
294c1a23
...
...
@@ -421,13 +421,13 @@ function _captcha_get_posted_captcha_info(array $element, FormStateInterface $fo
$posted_captcha_sid
=
NULL
;
}
// Invalidate CAPTCHA token to avoid reuse
when the form is submitted
.
if
(
!
empty
(
$form_state
[
'submitted'
])
&&
!
empty
(
$posted_captcha_sid
))
{
// Invalidate CAPTCHA token to avoid reuse.
if
(
!
empty
(
$posted_captcha_sid
))
{
\
Drupal
::
database
()
->
update
(
'captcha_sessions'
)
->
fields
([
'token'
=>
NULL
])
->
condition
(
'csid'
,
$posted_captcha_sid
)
->
execute
();
}
}
}
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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