Skip to content

🎧 Your Personal Streaming Service

"Spell-Jacking" mitigation ~ prevent sensitive data leak from spell checker. (#2091)

Daniel Hammerfc8462dc8ac8
diff --git a/ui/src/layout/Login.js b/ui/src/layout/Login.js
index cb8164b7c..a197b495b 100644
--- a/ui/src/layout/Login.js
+++ b/ui/src/layout/Login.js
@@ -138,6 +138,7 @@ const FormLogin = ({ loading, handleSubmit, validate }) => {
component={renderInput}
label={translate('ra.auth.username')}
disabled={loading}
+ spellCheck={false}
/>
</div>
<div className={classes.input}>
@@ -201,6 +202,7 @@ const FormSignUp = ({ loading, handleSubmit, validate }) => {
component={renderInput}
label={translate('ra.auth.username')}
disabled={loading}
+ spellCheck={false}
/>
</div>
<div className={classes.input}>
diff --git a/ui/src/user/UserCreate.js b/ui/src/user/UserCreate.js
index 8a7c32124..5d817dd01 100644
--- a/ui/src/user/UserCreate.js
+++ b/ui/src/user/UserCreate.js
@@ -51,10 +51,18 @@ const UserCreate = (props) => {
return (
<Create title={<Title subTitle={title} />} {...props}>
<SimpleForm save={save} variant={'outlined'}>
- <TextInput source="userName" validate={[required()]} />
+ <TextInput
+ spellCheck={false}
+ source="userName"
+ validate={[required()]}
+ />
<TextInput source="name" validate={[required()]} />
- <TextInput source="email" validate={[email()]} />
- <PasswordInput source="password" validate={[required()]} />
+ <TextInput spellCheck={false} source="email" validate={[email()]} />
+ <PasswordInput
+ spellCheck={false}
+ source="password"
+ validate={[required()]}
+ />
<BooleanInput source="isAdmin" defaultValue={false} />
</SimpleForm>
</Create>
diff --git a/ui/src/user/UserEdit.js b/ui/src/user/UserEdit.js
index 528ed365b..81883f0ce 100644
--- a/ui/src/user/UserEdit.js
+++ b/ui/src/user/UserEdit.js
@@ -108,22 +108,32 @@ const UserEdit = (props) => {
save={save}
>
{permissions === 'admin' && (
- <TextInput source="userName" validate={[required()]} />
+ <TextInput
+ spellCheck={false}
+ source="userName"
+ validate={[required()]}
+ />
)}
<TextInput
source="name"
validate={[required()]}
{...getNameHelperText()}
/>
- <TextInput source="email" validate={[email()]} />
+ <TextInput spellCheck={false} source="email" validate={[email()]} />
<BooleanInput source="changePassword" />
<FormDataConsumer>
{(formDataProps) => (
- <CurrentPasswordInput isMyself={isMyself} {...formDataProps} />
+ <CurrentPasswordInput
+ spellCheck={false}
+ isMyself={isMyself}
+ {...formDataProps}
+ />
)}
</FormDataConsumer>
<FormDataConsumer>
- {(formDataProps) => <NewPasswordInput {...formDataProps} />}
+ {(formDataProps) => (
+ <NewPasswordInput spellCheck={false} {...formDataProps} />
+ )}
</FormDataConsumer>
{permissions === 'admin' && (