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: support change password with passwdqc #762

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oz123
Copy link
Contributor

@oz123 oz123 commented Aug 4, 2024

This one was quite tricky ... On systems where pam_passwdqc is installed the prompt for password after succesfully authenticating is not:

New password:

But:

Enter new password:

See:

https://github.com/openwall/passwdqc/blob/7bf266fcf6ce9782b73722664e36dabd68f48c48/pam_passwdqc.c#L64

passwdqc is installed by default in Gentoo, but might be also installed in other Linux distributions.

This one was quite tricky ... On systems where pam_passwdqc
is installed the prompt for password after succesfully authenticating
is not:

```
New password:
```

But:

```
Enter new password:
```

See:

https://github.com/openwall/passwdqc/blob/7bf266fcf6ce9782b73722664e36dabd68f48c48/pam_passwdqc.c#L64

passwdqc is installed by default in Gentoo, but might be also installed
in other Linux distributions.
@lukefromdc lukefromdc requested a review from a team August 8, 2024 06:34
@lukefromdc
Copy link
Member

I don't have libpam-passwdqc installed on my system so of course I've never seen this, but it seems to me if you are checking the strength of a password or changing a password, "Enter new password:" and "new password:" are functionally equivalent.

This is not something I know much about, so I will have to leave this for others to review for now

@cwendling
Copy link
Member

This is not something I know much about, so I will have to leave this for others to review for now

Same, but the changes look reasonable (not tested though).

@lukefromdc
Copy link
Member

In master I was able to fix the travis issue in Debian, which was caused by a no longer offered transitional package. This time around though we got a "failure to deploy" error in Fedora, though as the ci fix was not a release that code should not have run at all. Was NOT the gem error I was getting elsewhere, but is beyond my knowledge or ability to fix unaided


after_success

0.01s$ if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_PULL_REQUEST" != "false" && ${DISTRO} =~ ^fedora.*$ ]]; then REPO_SLUG_ARRAY=(${TRAVIS_REPO_SLUG//\// }); REPO_NAME=${REPO_SLUG_ARRAY[1]}; URL="https://${REPO_NAME}.mate-desktop.dev"; COMMENT="Code analysis completed"; curl -H "Authorization: token $GITHUB_TOKEN" -X POST -d "{\"state\": \"success\", \"description\": \"$COMMENT\", \"context\":\"scan-build\", \"target_url\": \"$URL\"}" https://api.github.com/repos/${TRAVIS_REPO_SLUG}/statuses/${TRAVIS_PULL_REQUEST_SHA}; fi
dpl_0

$ rvm use $(travis_internal_ruby) --fuzzy do ruby -S gem uninstall -aIx dpl

/home/travis/.rvm/gems/ruby-3.3.1/gems/cl-1.2.4/lib/cl/opts.rb:112:in `block in taint': undefined method `taint' for an instance of String (NoMethodError)

          [key, self[key] && self[key].secret? ? value.taint : value]

                                                      ^^^^^^

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/cl-1.2.4/lib/cl/opts.rb:111:in `each'

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/cl-1.2.4/lib/cl/opts.rb:111:in `map'

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/cl-1.2.4/lib/cl/opts.rb:111:in `taint'

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/cl-1.2.4/lib/cl/opts.rb:25:in `apply'

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/cl-1.2.4/lib/cl/cmd.rb:62:in `initialize'

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/dpl-2.0.3.beta.4/lib/dpl/provider.rb:196:in `initialize'

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/cl-1.2.4/lib/cl/runner/default.rb:32:in `new'

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/cl-1.2.4/lib/cl/runner/default.rb:32:in `cmd'

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/cl-1.2.4/lib/cl/runner/default.rb:26:in `run'

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/cl-1.2.4/lib/cl.rb:34:in `run'

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/dpl-2.0.3.beta.4/lib/dpl/cli.rb:11:in `run'

	from /home/travis/.rvm/gems/ruby-3.3.1/gems/dpl-2.0.3.beta.4/bin/dpl:9:in `<top (required)>'

	from /home/travis/.rvm/gems/ruby-3.3.1/bin/dpl:25:in `load'

	from /home/travis/.rvm/gems/ruby-3.3.1/bin/dpl:25:in `<main>'

failed to deploy

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.

3 participants