-
Notifications
You must be signed in to change notification settings - Fork 155
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
Validate against Banned-Passwords List #9727
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
@@ -21,6 +21,7 @@ services: | |||
FRONTEND_SEARCH_MIN_LENGTH: "2" | |||
FRONTEND_OCS_ENABLE_DENIALS: "true" | |||
FRONTEND_FULL_TEXT_SEARCH_ENABLED: "true" | |||
FRONTEND_PASSWORD_POLICY_BANNED_PASSWORDS_LIST: '/etc/ocis/password-policy-banned-passwords.txt' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added some demo data, can't hurt
issue with generating passwords, does't emit input and therefore error message won't be resettet. |
const { $gettext } = useGettext() | ||
const password = ref(props.value) | ||
const showPassword = ref(false) | ||
const passwordEntered = ref(false) | ||
const copyPasswordIconInitial = 'file-copy' | ||
const copyPasswordIcon = ref(copyPasswordIconInitial) | ||
|
||
const hasError = computed(() => { | ||
return (attrs?.class as string)?.includes('oc-text-input-danger') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not ideal, but I don't want to add more component props
} | ||
}, | ||
|
||
checkLinkToUpdate({ link, onSuccess = () => {} }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed all those onSuccess and onError callbacks because they actually weren't used and added to confusion.
onCancel: () => store.dispatch('hideModal'), | ||
onConfirm: async (password) => { | ||
if (!password || password.trim() === '') { | ||
store.dispatch('showErrorMessage', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed anymore as built in default password policy. Also closing the modal instantly was not correct, because we might want to show an error in the modal.
@@ -30,22 +30,12 @@ export function showQuickLinkPasswordModal({ $gettext, store, passwordPolicyServ | |||
inputGeneratePasswordMethod: () => passwordPolicyService.generatePassword(), | |||
inputLabel: $gettext('Password'), | |||
inputType: 'password', | |||
onInput: () => store.dispatch('setModalInputErrorMessage', ''), | |||
onPasswordChallengeCompleted: () => store.dispatch('setModalConfirmButtonDisabled', false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed those in the last pr.
Object.keys(this.capability).length === 0 || | ||
(Object.keys(this.capability).length === 1 && | ||
Object.keys(this.capability)[0] === 'max_characters') | ||
!this.capability.min_characters && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are always set, defaults to 0, so had to change the logic
} | ||
|
||
this.showMessage({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be here.
SonarCloud Quality Gate failed. 0 Bugs 36.6% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: