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

Some additions / modifications to password validation #27

Merged
merged 24 commits into from
Nov 29, 2020

Conversation

Vlix
Copy link
Collaborator

@Vlix Vlix commented Oct 18, 2020

I went through the validate-password code on my own laptop at some point and checked the comments, tried to make it a bit more DRY and tried to separate the policy validation from the password validation.

I'll probably do a last pass over the entire module for correctness and reader-friendliness just before we'll merge everything in.

@Vlix Vlix added the enhancement New feature or request label Oct 18, 2020
@Vlix Vlix removed the enhancement New feature or request label Oct 18, 2020
@cdepillabout
Copy link
Owner

cc @HirotoShioi in case he wants to do a review of this as well

Copy link
Owner

@cdepillabout cdepillabout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks really good!

I left a couple comments, but I don't think any of these should necessarily block it being merged in!

password/src/Data/Password/Validate.hs Outdated Show resolved Hide resolved
password/src/Data/Password/Validate.hs Outdated Show resolved Hide resolved
password/src/Data/Password/Validate.hs Outdated Show resolved Hide resolved
@Vlix
Copy link
Collaborator Author

Vlix commented Nov 1, 2020

I think this should be most of the code in the module.

I've also started on a more clear explanation in how to use this module, but that will need a bit more iterations to have it be readable and usable for new users of this module.

Copy link
Owner

@cdepillabout cdepillabout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, thanks for fixing it up!

@Vlix
Copy link
Collaborator Author

Vlix commented Nov 10, 2020

Ok, I've finished adding documentation and checking how the Haddocks look. Do tell if anything obvious stands out, or if something is confusing.

Copy link
Owner

@cdepillabout cdepillabout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took another look at this and I think it looks pretty good!

Thanks again for fixing this up and getting it ready to merge in.

Also, please feel free to credit yourself in the ChangeLog.md, since you did a bunch of the work for this. (Although I guess thinking about this, I haven't been crediting myself in the ChangeLog, so I guess it makes sense for neither of us to credit ourselves!)

@Vlix
Copy link
Collaborator Author

Vlix commented Nov 13, 2020

TODO:

  • Change InvalidPolicyReason's ProvidedLengths into Min-/MaximumLength
  • Add TH function to easily validate a static policy at compile time

@Vlix
Copy link
Collaborator Author

Vlix commented Nov 16, 2020

Ok, added TemplateHaskell function and an extra InvalidPolicyReason.
Will go and add a TH function example to the documentation later (and then also update the ChangeLog.md).
If there's no blatant mistakes in the code/tests, I think we're finally done to update the package to 2.1.0.0

@Vlix
Copy link
Collaborator Author

Vlix commented Nov 17, 2020

Ok, I think I'm done with all the additions and documentation.
@cdepillabout If you could check the last couple of commits (or recheck the entire diff) for anything out of the ordinary, that'd be great.
I'll be doing a quick skim over the entire diff before merging after that.

Copy link
Owner

@cdepillabout cdepillabout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a look a this and it looks really good to me!

@Vlix Vlix merged commit 1651af1 into cdepillabout:validate-password Nov 29, 2020
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

Successfully merging this pull request may close these issues.

2 participants