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

Don’t allow calling reveal in release builds #66

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

Conversation

DemiMarie
Copy link
Contributor

Some structs have a reveal method, which deliberately leaks secret
information for debug builds. There is no legitimate reason to use
them for anything other than debugging, and no uses at all in any of the
other codebases I am working on.

To ensure that no new uses of this method are added, make this method
only available when debug assertions are turned on. This ensures that
any attempts to uses this method will break release builds, and thus be
quickly discovered.

Some structs have a `reveal` method, which deliberately leaks secret
information for debug builds.  There is no legitimate reason to use
them for anything other than debugging, and no uses at all in any of the
other codebases I am working on.

To ensure that no new uses of this method are added, make this method
only available when debug assertions are turned on.  This ensures that
any attempts to uses this method will break release builds, and thus be
quickly discovered.
@DemiMarie
Copy link
Contributor Author

DemiMarie commented Dec 2, 2018

CI failure is due to:

  1. changes to lints in newer versions of Clippy
  2. Changes to rustfmt.

I will fix both.

Edit: It seems that we cannot fix both, since at least rustfmt has changed between stable and beta.

@c0gent
Copy link
Contributor

c0gent commented Dec 3, 2018

I'm glad we take advantage of the massive productivity gains offered by clippy and rustfmt :)

/sarcasm off

@afck
Copy link
Collaborator

afck commented Dec 3, 2018

That's weird. I can't reproduce that locally; also, the "pr" build passed, and only the "push" one failed. For some reason, the latter called

rustup toolchain install ${RUST_NEXT}

and the former didn't. Is it using Rust nightly or beta for some reason??

@afck
Copy link
Collaborator

afck commented Dec 3, 2018

Maybe you just need to rebase? The no_leak_in_release_builds branch seems to have an outdated .travis.yml.

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