Skip to content
Snippets Groups Projects
Commit af043ee3 authored by Christian Eßl's avatar Christian Eßl Committed by Ralf Zimmermann
Browse files

[BUGFIX] Disable browser autofill feature for the honeypot field

Use the form element name for the autocomplete html attribute
for honeypot fields to prevent browsers "autofill" feature
to fill the honeypot field.

Resolves: #89420
Releases: master, 9.5
Change-Id: Ifee039477e1070043fdd0007340a95799dac5b6f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62000


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarBjörn Jacob <bjoern.jacob@tritum.de>
Tested-by: default avatarMathias Brodala <mbrodala@pagemachine.de>
Tested-by: default avatarRalf Zimmermann <ralf.zimmermann@tritum.de>
Reviewed-by: default avatarMathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: default avatarBjörn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: default avatarRalf Zimmermann <ralf.zimmermann@tritum.de>
parent fec22783
Branches
Tags
No related merge requests found
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true">
<f:if condition="{element.properties.renderAsHiddenField}">
<f:then>
<f:form.hidden property="{element.identifier}" id="{element.uniqueIdentifier}" additionalAttributes="{autocomplete: 'off'}" />
<f:form.hidden property="{element.identifier}" id="{element.uniqueIdentifier}" additionalAttributes="{autocomplete: element.identifier}" />
</f:then>
<f:else>
<f:form.textfield property="{element.identifier}" id="{element.uniqueIdentifier}" class="{element.properties.elementClassAttribute}" additionalAttributes="{autocomplete: 'off', aria-hidden: 'true'}" tabindex="-1" style="{element.properties.styleAttribute}" />
<f:form.textfield property="{element.identifier}" id="{element.uniqueIdentifier}" class="{element.properties.elementClassAttribute}" additionalAttributes="{autocomplete: element.identifier, aria-hidden: 'true'}" tabindex="-1" style="{element.properties.styleAttribute}" />
</f:else>
</f:if>
</html>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment