"Spell-Jacking" mitigation ~ prevent sensitive data leak from spell checker. (#2091)
@see https://www.otto-js.com/news/article/chrome-and-edge-enhanced-spellcheck-features-expose-pii-even-your-passwords Co-authored-by: Daniel Hammer <daniel.hammer+oss@gmail.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
+14
-4
@@ -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' && (
|
||||
|
||||
Reference in New Issue
Block a user