Skip to content

Commit 213bcb5

Browse files
authored
[ESD-22866] Disable spellcheck and autocorrect on all sensitive input fields (#2178)
* Disable spellcheck and autocorrect on all sensitive input fields 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 * Disable autocorrect and spellcheck for vcode and phone
1 parent d69e607 commit 213bcb5

File tree

8 files changed

+14
-2
lines changed

8 files changed

+14
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
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>"`;
3+
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>"`;

src/ui/input/captcha_input.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ export default class CaptchaInput extends React.Component {
114114
placeholder={placeholder}
115115
autoComplete="off"
116116
autoCapitalize="off"
117+
autoCorrect="off"
118+
spellCheck="false"
117119
onChange={::this.handleOnChange}
118120
onFocus={::this.handleFocus}
119121
onBlur={::this.handleBlur}

src/ui/input/email_input.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ export default class EmailInput extends React.Component {
6767
placeholder="yours@example.com"
6868
autoComplete={autoComplete ? 'on' : 'off'}
6969
autoCapitalize="off"
70+
autoCorrect="off"
71+
spellCheck="false"
7072
onChange={::this.handleOnChange}
7173
onFocus={::this.handleFocus}
7274
onBlur={::this.handleBlur}

src/ui/input/mfa_code_input.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export default class MFACodeInput extends React.Component {
4646
className="auth0-lock-input"
4747
autoComplete="off"
4848
autoCapitalize="off"
49+
autoCorrect="off"
50+
spellCheck="false"
4951
onChange={::this.handleOnChange}
5052
onFocus={::this.handleFocus}
5153
onBlur={::this.handleBlur}

src/ui/input/password_input.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ export default class PasswordInput extends React.Component {
9191
className="auth0-lock-input"
9292
autoComplete={allowPasswordAutocomplete ? 'on' : 'off'}
9393
autoCapitalize="off"
94+
autoCorrect="off"
95+
spellCheck="false"
9496
onChange={::this.handleOnChange}
9597
onFocus={::this.handleFocus}
9698
onBlur={::this.handleBlur}

src/ui/input/phone_number_input.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ export default class PhoneNumberInput extends React.Component {
4949
name="phoneNumber"
5050
className="auth0-lock-input auth0-lock-input-number"
5151
autoComplete="off"
52+
autoCorrect="off"
53+
spellCheck="false"
5254
onFocus={::this.handleFocus}
5355
onBlur={::this.handleBlur}
5456
aria-label="Telephone number"

src/ui/input/username_input.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default class UsernameInput extends React.Component {
6060
placeholder="username"
6161
autoComplete={autoComplete ? 'on' : 'off'}
6262
autoCapitalize="off"
63-
spellCheck="off"
63+
spellCheck="false"
6464
autoCorrect="off"
6565
onChange={::this.handleOnChange}
6666
onFocus={::this.handleFocus}

src/ui/input/vcode_input.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export default class VcodeInput extends React.Component {
5858
className="auth0-lock-input auth0-lock-input-code"
5959
autoComplete="off"
6060
autoCapitalize="off"
61+
autoCorrect="off"
62+
spellCheck="false"
6163
onFocus={::this.handleFocus}
6264
onBlur={::this.handleBlur}
6365
aria-label="vcode"

0 commit comments

Comments
 (0)