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

Allow plaintext to be "false" #17

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

JRaspass
Copy link

@JRaspass JRaspass commented Jan 7, 2025

At $work we ran into an issue where messages could end up being "false", especially if they come from an automated system, and therefore end up rejected by this library. This sprinkles a few defined() checks to fix this and enhances our test coverage of this issue.

I've marked this PR as draft as I feel it needs more discussion as it is a change of behaviour, at the very least it'll need an issue number to reference in the test.

@timlegge timlegge self-assigned this Jan 8, 2025
@timlegge
Copy link

timlegge commented Jan 8, 2025

This I will need to look at closer

@JRaspass
Copy link
Author

@timlegge Hey, don't suppose you've had any time to look through this PR? Thanks.

@timlegge
Copy link

@JRaspass it looks fine. I likely would have left t/51-gh7.t in place simply to show that the changes did not impact current test but I did confirm it so that's fine

Rather than truth checking we check for definedness allowing zero and
empty string to be encrypted, signed, etc.
@JRaspass JRaspass marked this pull request as ready for review January 28, 2025 03:51
@JRaspass
Copy link
Author

Awesome, thanks. I've updated the comment in the test to point at this PR and marked it ready to review then. Did you want this commit to update the Changes? Or do you prefer to do them all at release time?

@timlegge
Copy link

i will add them at release time

@timlegge timlegge merged commit 2ab7c64 into perl-Crypt-OpenPGP:master Jan 29, 2025
17 checks passed
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.

2 participants