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

Solution for issue 1098 - prompted passwords are not properly persisted into sessions #1239

Conversation

sebastianczech
Copy link
Contributor

Pull request is proposition of solution for the issue #1098 , where prompted passwords are not properly persisted into sessions. Below is an example how it works after applying solution:

asciicast

This is my first contribution into open source, so all feedback is more than welcome ;)

@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2021

Codecov Report

Merging #1239 (40c3ef6) into master (4d7d6b6) will decrease coverage by 0.72%.
The diff coverage is 94.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1239      +/-   ##
==========================================
- Coverage   97.28%   96.56%   -0.73%     
==========================================
  Files          67       85      +18     
  Lines        4235     5729    +1494     
==========================================
+ Hits         4120     5532    +1412     
- Misses        115      197      +82     
Impacted Files Coverage Δ
tests/test_binary.py 100.00% <ø> (ø)
httpie/compat.py 31.11% <27.90%> (-68.89%) ⬇️
tests/conftest.py 77.14% <58.33%> (-9.82%) ⬇️
httpie/output/lexers/http.py 59.09% <59.09%> (ø)
tests/test_ssl.py 91.01% <66.66%> (-3.93%) ⬇️
httpie/output/lexers/common.py 75.00% <75.00%> (ø)
httpie/output/lexers/metadata.py 81.25% <81.25%> (ø)
httpie/manager/__main__.py 82.35% <82.35%> (ø)
httpie/uploads.py 98.68% <83.33%> (-1.32%) ⬇️
httpie/models.py 94.94% <88.88%> (-2.42%) ⬇️
... and 65 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 05c02f0...40c3ef6. Read the comment docs.

Copy link
Contributor

@isidentical isidentical left a comment

Choose a reason for hiding this comment

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

The solution seems a bit localized, see my comments. Other than that; I am not really a big fan of storing raw passwords locally, so I would personally go with re-asking it rather than storing it as plain text. CC: @jakubroztocil on the product decision

httpie/cli/argtypes.py Outdated Show resolved Hide resolved
httpie/plugins/builtin.py Outdated Show resolved Hide resolved
@isidentical isidentical force-pushed the issue-1098-prompted-password-save-in-session-file branch from d7c3185 to 40c3ef6 Compare December 29, 2021 08:49
Copy link
Contributor

@isidentical isidentical left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the PR @sebastianczech. I've noticed that the change you have made on the has_password broke the use case of empty passwords, so I manually fixed it and pushed it. The rest LGTM. Amazing first contribution 🎉

@sebastianczech
Copy link
Contributor Author

Thank you @isidentical for review, fixing has_password and merging changes

@sebastianczech sebastianczech deleted the issue-1098-prompted-password-save-in-session-file branch December 30, 2021 08:50
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.

None yet

3 participants