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 from stdin #89

Merged
merged 4 commits into from
Jul 23, 2021
Merged

Conversation

EvilBit
Copy link
Contributor

@EvilBit EvilBit commented Jul 17, 2021

fixes #86

At the moment, this forbids \0 in input stream, but allows \n, etc. Not sure if we want to restrict --password to single-line, printable ASCII only, or arbitrary binary secrets (and what about \0 in that case).

@codecov
Copy link

codecov bot commented Jul 17, 2021

Codecov Report

Merging #89 (c9cbceb) into master (d4b8937) will increase coverage by 0.08%.
The diff coverage is 61.90%.

❗ Current head c9cbceb differs from pull request most recent head 2d29a8a. Consider uploading reports for the commit 2d29a8a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
+ Coverage   81.67%   81.75%   +0.08%     
==========================================
  Files           4        4              
  Lines         802      822      +20     
==========================================
+ Hits          655      672      +17     
- Misses        147      150       +3     
Impacted Files Coverage Δ
src/tpm2-totp.c 76.57% <61.90%> (-0.53%) ⬇️
src/libtpm2-totp.c 85.74% <0.00%> (+0.71%) ⬆️

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 d4b8937...2d29a8a. Read the comment docs.

Copy link
Member

@diabonas diabonas left a comment

Choose a reason for hiding this comment

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

LGTM! Could you rebase to include 8cf5b58 ("test: should not recover secret with incorrect password") into b2500a6 ("feat: read password from stdin"), please? This will make future bisects easier because you don't have to deal with transient CI failures (in this case from scan-build).

@EvilBit
Copy link
Contributor Author

EvilBit commented Jul 22, 2021

LGTM! Could you rebase to include 8cf5b58 ("test: should not recover secret with incorrect password") into b2500a6 ("feat: read password from stdin"), please? This will make future bisects easier because you don't have to deal with transient CI failures (in this case from scan-build).

Sure. But I believe you meant c9cbceb fix: close potential memory leak in reading from stdin, not 8cf5b58 test: should not recover secret with incorrect password?

@diabonas
Copy link
Member

Sure. But I believe you meant c9cbceb fix: close potential memory leak in reading from stdin, not 8cf5b58 test: should not recover secret with incorrect password?

Oops, you are right, I meant to squash c9cbceb into b2500a6. Also please rebase onto the current master to resolve the conflict after merging #88 :)

@EvilBit EvilBit force-pushed the password_from_stdin branch from c9cbceb to 2d29a8a Compare July 22, 2021 17:46
@EvilBit
Copy link
Contributor Author

EvilBit commented Jul 22, 2021

Also please rebase onto the current master to resolve the conflict after merging #88 :)

Sure ;)
I knew that would eventually be necessary when submitting multiple PRs simultaneously, but I wanted to develop all features independently based on current master, in case one wouldn't be accepted upstream.

If you know of a nicer way to manage this kind of situation, please let me know. :)

Copy link
Member

@diabonas diabonas left a comment

Choose a reason for hiding this comment

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

If you know of a nicer way to manage this kind of situation, please let me know. :)

Not really, unfortunately - I usually base on the current master and rebase if necessary as well

@diabonas diabonas merged commit 49a81b9 into tpm2-software:master Jul 23, 2021
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.

Password should never be passed as an argument
2 participants