Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't display password managers on irrelevant input fields #5004

Merged
merged 3 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading