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

[bug]: OpenPGP EOF #1024

Closed
1 task done
frenzybiscuit opened this issue Dec 21, 2024 · 4 comments
Closed
1 task done

[bug]: OpenPGP EOF #1024

frenzybiscuit opened this issue Dec 21, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@frenzybiscuit
Copy link

What happened?

I'm on the enterprise version of Stalwart (0.10.7) and when uploading the public OpenPGP key it errors out with unexpected EOF.

I have had another user verify this.

How can we reproduce the problem?

Attempt to upload OpenPGP public key

Version

v0.10.x

What database are you using?

PostgreSQL

What blob storage are you using?

PostgreSQL

Where is your directory located?

Internal

What operating system are you using?

Linux

Relevant log output

2024-12-21T20:01:14Z DEBUG HTTP request URL (http.request-url) listenerId = "https", localPort = 443, remoteIp = iphere, remotePort = 37852, url = "/api/account/crypto"
2024-12-21T20:01:14Z DEBUG Management error (manage.error) listenerId = "https", localPort = 443, remoteIp = iphere, remotePort = 37852, details = "Failed to parse OpenPGP public key: unexpected EOF

Code of Conduct

  • I agree to follow this project's Code of Conduct
@frenzybiscuit frenzybiscuit added the bug Something isn't working label Dec 21, 2024
@Ast3risk-ops
Copy link

Ast3risk-ops commented Dec 21, 2024

We've tried RSA4096 and EDDSA 255-bit.

@mdecimus
Copy link
Member

If you have experience with Rust, try reading your key with sequoia which is the library that Stalwart uses.
Also, in case this is a bug related to a missing new line, try adding a few enters at the end of your key to see if that fixes the import.
If it doesn't we're going to need your public key (or instructions on how to generate one with the same parameters as yours) so this can be tested.

@Ast3risk-ops
Copy link

Ast3risk-ops commented Dec 24, 2024

If you have experience with Rust, try reading your key with sequoia which is the library that Stalwart uses. Also, in case this is a bug related to a missing new line, try adding a few enters at the end of your key to see if that fixes the import. If it doesn't we're going to need your public key (or instructions on how to generate one with the same parameters as yours) so this can be tested.

Holy shit that worked. Adding like 5 newlines at the very end (after ---END PGP PUBLIC KEY BLOCK---) worked. Hit refresh and it's been converted into a stalwart certificate successfully.

Link to my public key for reference.

@mdecimus
Copy link
Member

Great, I'll leave this open so Stalwart automatically adds the missing \n to the certificates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants