Update password strength check#8455
Merged
andreslucena merged 25 commits intodecidim:developfrom Dec 20, 2021
Merged
Conversation
ahukkanen
reviewed
Nov 2, 2021
ahukkanen
reviewed
Nov 2, 2021
ahukkanen
reviewed
Nov 2, 2021
ahukkanen
reviewed
Nov 2, 2021
ahukkanen
reviewed
Nov 2, 2021
ahukkanen
reviewed
Nov 2, 2021
ahukkanen
reviewed
Nov 2, 2021
ahukkanen
reviewed
Nov 2, 2021
ahukkanen
reviewed
Nov 2, 2021
Contributor
|
I believe the blacklist option is still missing from this implementation compared to nobspw. |
ahukkanen
reviewed
Nov 2, 2021
ahukkanen
reviewed
Nov 2, 2021
6 tasks
ahukkanen
reviewed
Nov 23, 2021
ahukkanen
reviewed
Nov 23, 2021
ahukkanen
reviewed
Dec 14, 2021
Contributor
|
@andreslucena This is ready for review. |
andreslucena
requested changes
Dec 17, 2021
Member
andreslucena
left a comment
There was a problem hiding this comment.
I think I found a bug with a spec, can you check it 🙏🏽 ?
ahukkanen
reviewed
Dec 17, 2021
|
|
||
| describe "#passwords" do | ||
| it "returns passwords" do | ||
| expect(subject.instance.passwords).to be_kind_of(Array) |
Contributor
There was a problem hiding this comment.
@lahdeero I noticed another issue with this after the latest changes.
If this test is run before the .update_passwords! test, the password file may not exist at the overridden path and it may throw an exception.
If you run the following:
$ cd decidim-core
$ rm -f ../spec/decidim_dummy_app/tmp/common-passwords.txt
$ bundle exec rspec spec/lib/common_passwords_spec.rb --seed 18259
This would throw the following error:
1) Decidim::CommonPasswords when file exists and request returns body #passwords returns passwords
Failure/Error: raise FileNotFoundError unless File.exist?(self.class.common_passwords_path)
Decidim::CommonPasswords::FileNotFoundError:
Decidim::CommonPasswords::FileNotFoundError
# ./lib/decidim/common_passwords.rb:16:in `initialize'
# ./spec/lib/common_passwords_spec.rb:31:in `block (4 levels) in <module:Decidim>'
So, maybe we should call subject.update_passwords! also in this test?
Contributor
Author
There was a problem hiding this comment.
Then they would be almost identical tests. I just merged these tests.
andreslucena
approved these changes
Dec 20, 2021
Member
|
Great job @lahdeero!! 👏🏽 👏🏽 |
6 tasks
basicavisual
added a commit
to CodeandoMexico/decidim-monterrey
that referenced
this pull request
Nov 8, 2022
The list of changes: 1. Removed dependency NOBSPW reference in registrations view as per PR decidim/decidim#8455 2. Rewrote view to be compatible to decidim-module-friendly_signup (see https://github.com/OpenSourcePolitics/decidim-module-friendly_signup/blob/main/app/views/decidim/devise/registrations/new.html.erb ) 3. Included the gem's locales at config/locales/firendly_signup/es.yml, so parse all subfolders and files under config/locales/ at application.rb:19 4. Added the config/initializers/friendly_signup.rb to specify the features we are going to use 5. Updated version.rb for decidim-module-ine so that it accepts version 0.26.X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
Removed nobspw dependency and wrote similar solution into Decidim.
Includes also rake tasks to update common passwords dictionary. Usage:
bundle exec rake decidim:common_passwords:updatein root directory.📌 Related Issues
#8453
#7234
Testing
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.📷 Screenshots