Skip to content

Commit

Permalink
fix: Don't display password managers on irrelevant input fields (#5004)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolodato authored Jan 16, 2025
1 parent 8db1a3d commit c04eb95
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/web/components/SimpleTwoFactor/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default class TheComponent extends PureComponent {
>
<InputGroup
inputProps={{
autocomplete: 'one-time-code',
className: 'full-width',
style: { paddingLeft: 10, textIndent: 0 },
}}
Expand Down
3 changes: 2 additions & 1 deletion frontend/web/components/base/forms/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const Input = class extends React.Component {
className={innerClassName}
disabled={disabled}
autoComplete={
this.props.enableAutoComplete ? undefined : 'one-time-code'
this.props.enableAutoComplete ?? this.props.autocomplete
}
/>
)}
Expand Down Expand Up @@ -214,6 +214,7 @@ Input.defaultProps = {
}

Input.propTypes = {
autocomplete: propTypes.string,
className: propTypes.any,
inputClassName: OptionalString,
isValid: propTypes.any,
Expand Down
1 change: 1 addition & 0 deletions frontend/web/components/modals/ChangeEmailAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const ChangeEmailAddress: FC<ChangeEmailAddressType> = ({ onComplete }) => {
setPassword(Utils.safeParseEventValue(event))
}}
type='password'
autocomplete='current-password'
name='password'
/>
{isError && (
Expand Down
3 changes: 3 additions & 0 deletions frontend/web/components/pages/AccountSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ class TheComponent extends Component {
}
type='password'
name='Current Password*'
autocomplete='current-password'
/>
<InputGroup
className='mt-4'
Expand All @@ -404,6 +405,7 @@ class TheComponent extends Component {
}
isValid={new_password1 && new_password1.length}
type='password'
autocomplete='new-password'
name='New Password*'
/>
<InputGroup
Expand All @@ -422,6 +424,7 @@ class TheComponent extends Component {
}
isValid={new_password2 && new_password2.length}
type='password'
autocomplete='new-password'
name='Confirm New Password*'
/>
{passwordError && (
Expand Down

0 comments on commit c04eb95

Please sign in to comment.