Skip to content

Fix decryption with multiple recipients#42

Merged
Foxboron merged 1 commit intoFoxboron:masterfrom
supermarin:fix-multiple-recipients
Jan 24, 2026
Merged

Fix decryption with multiple recipients#42
Foxboron merged 1 commit intoFoxboron:masterfrom
supermarin:fix-multiple-recipients

Conversation

@supermarin
Copy link
Copy Markdown
Contributor

@supermarin supermarin commented Jan 23, 2026

Seems like Identity.Unwrap() was returning too early, i.e. on identity mismatch. The simplest fix was just to check if err == nil and return the filekey. Ended up checking for incorrect identity and propagating errors if there's something else.

Fixes #38 #39

@supermarin supermarin force-pushed the fix-multiple-recipients branch 2 times, most recently from 0e46278 to 4cfc769 Compare January 23, 2026 18:15
@Foxboron
Copy link
Copy Markdown
Owner

This makes sense, thanks for working out a fix!

@supermarin supermarin force-pushed the fix-multiple-recipients branch 2 times, most recently from c3a3624 to 6c1d4f6 Compare January 24, 2026 16:30
@supermarin supermarin changed the title Fix multiple recipients Fix decryption with multiple recipients Jan 24, 2026
@Foxboron
Copy link
Copy Markdown
Owner

Looks fine, thanks!

Please squash the commits and I'll merge and do a release :)

@supermarin supermarin force-pushed the fix-multiple-recipients branch from 6c1d4f6 to 8f4b770 Compare January 24, 2026 16:42
@supermarin
Copy link
Copy Markdown
Contributor Author

:shipit:

@supermarin supermarin force-pushed the fix-multiple-recipients branch from 8f4b770 to df652be Compare January 24, 2026 20:12
@supermarin
Copy link
Copy Markdown
Contributor Author

@Foxboron please rerun the CI, pushed fix for staticcheck on Error: plugin/identity.go:89:6: arguments have the wrong order (SA1032)

@Foxboron
Copy link
Copy Markdown
Owner

Right, the argument order there is iffy and I've made the same mistake myself :)

@Foxboron Foxboron merged commit bef31f1 into Foxboron:master Jan 24, 2026
5 checks passed
@supermarin supermarin deleted the fix-multiple-recipients branch January 24, 2026 20:34
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.

bug: after updating to 1.0.0, not able to decrypt existing files w/ existing keys

2 participants