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

Password validation does not work good with a harbor server connected to LDAP #31

Open
jonsv322 opened this issue Dec 21, 2024 · 0 comments

Comments

@jonsv322
Copy link

jonsv322 commented Dec 21, 2024

Having a password validation in the client does not look like a good idea.

I have a harbor server connected to an LDAP which has it set of password requirements, just let the server handle the authetication instead of doing a client enforcement on how your password needs to be. My users can login due to how the code is written.

The validation can be there for creating a user but not for login.

Remove the password validation from pkg/views/login/create.go.

diff --git a/pkg/views/login/create.go b/pkg/views/login/create.go
index ad65352..aae78f7 100644
--- a/pkg/views/login/create.go
+++ b/pkg/views/login/create.go
@@ -58,9 +58,6 @@ func CreateView(loginView *LoginView) {
                                        if strings.TrimSpace(str) == "" {
                                                return errors.New("password cannot be empty or only spaces")
                                        }
-                                       if err := utils.ValidatePassword(str); err != nil {
-                                               return err
-                                       }
                                        return nil
                                }),
                        huh.NewInput().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant