Skip to content

Commit

Permalink
Disable spellcheck and autocorrect on all sensitive input fields
Browse files Browse the repository at this point in the history
These were already disabled for the username field spellcheck has recently been discovered to
potentially disclose information to browser vendors that provide this feature. So disabling it
helps to prevent this.

autocorrect is a safari only feature that will autocorrect what it believes to be misspelled words,
so this is disabled for user experience
  • Loading branch information
ewanharris committed Sep 23, 2022
1 parent d69e607 commit c244da0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`EmailInput renders without issue 1`] = `"<div data-__type=\\"input_wrap\\" data-invalidhint=\\"invalidHint\\" data-isvalid=\\"true\\" data-name=\\"email\\" data-icon=\\"[object Object]\\"><input type=\\"email\\" id=\\"1-email\\" inputmode=\\"email\\" name=\\"email\\" class=\\"auth0-lock-input\\" placeholder=\\"yours@example.com\\" autocomplete=\\"off\\" autocapitalize=\\"off\\" aria-label=\\"Email\\" aria-invalid=\\"false\\" value=\\"value\\"></div>"`;
exports[`EmailInput renders without issue 1`] = `"<div data-__type=\\"input_wrap\\" data-invalidhint=\\"invalidHint\\" data-isvalid=\\"true\\" data-name=\\"email\\" data-icon=\\"[object Object]\\"><input type=\\"email\\" id=\\"1-email\\" inputmode=\\"email\\" name=\\"email\\" class=\\"auth0-lock-input\\" placeholder=\\"yours@example.com\\" autocomplete=\\"off\\" autocapitalize=\\"off\\" autocorrect=\\"off\\" spellcheck=\\"false\\" aria-label=\\"Email\\" aria-invalid=\\"false\\" value=\\"value\\"></div>"`;
2 changes: 2 additions & 0 deletions src/ui/input/captcha_input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ export default class CaptchaInput extends React.Component {
placeholder={placeholder}
autoComplete="off"
autoCapitalize="off"
autoCorrect="off"
spellCheck="false"
onChange={::this.handleOnChange}
onFocus={::this.handleFocus}
onBlur={::this.handleBlur}
Expand Down
2 changes: 2 additions & 0 deletions src/ui/input/email_input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ export default class EmailInput extends React.Component {
placeholder="yours@example.com"
autoComplete={autoComplete ? 'on' : 'off'}
autoCapitalize="off"
autoCorrect="off"
spellCheck="false"
onChange={::this.handleOnChange}
onFocus={::this.handleFocus}
onBlur={::this.handleBlur}
Expand Down
2 changes: 2 additions & 0 deletions src/ui/input/mfa_code_input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export default class MFACodeInput extends React.Component {
className="auth0-lock-input"
autoComplete="off"
autoCapitalize="off"
autoCorrect="off"
spellCheck="false"
onChange={::this.handleOnChange}
onFocus={::this.handleFocus}
onBlur={::this.handleBlur}
Expand Down
2 changes: 2 additions & 0 deletions src/ui/input/password_input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ export default class PasswordInput extends React.Component {
className="auth0-lock-input"
autoComplete={allowPasswordAutocomplete ? 'on' : 'off'}
autoCapitalize="off"
autoCorrect="off"
spellCheck="false"
onChange={::this.handleOnChange}
onFocus={::this.handleFocus}
onBlur={::this.handleBlur}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/input/username_input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class UsernameInput extends React.Component {
placeholder="username"
autoComplete={autoComplete ? 'on' : 'off'}
autoCapitalize="off"
spellCheck="off"
spellCheck="false"
autoCorrect="off"
onChange={::this.handleOnChange}
onFocus={::this.handleFocus}
Expand Down

0 comments on commit c244da0

Please sign in to comment.