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

openpgp error on Debian package upload #28324

Closed
williamdes opened this issue Dec 2, 2023 · 3 comments · Fixed by #28352
Closed

openpgp error on Debian package upload #28324

williamdes opened this issue Dec 2, 2023 · 3 comments · Fixed by #28352

Comments

@williamdes
Copy link

Description

openpgp: invalid argument: user id field contained invalid characters

I did not configure anything in the gitea config for packages. Maybe I am missing something ?
This error can maybe be handled upper in the code and provide a better hint

Gitea Version

1.21.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

See: https://docs.gitea.com/next/usage/packages/packages/debian#publish-a-package

PUT /api/packages/wdes/debian/pool/bookworm/main/upload HTTP/2

the curl command outputs the server reply: openpgp: invalid argument: user id field contained invalid characters

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker rootless

Database

MySQL/MariaDB

@KN4CK3R
Copy link
Member

KN4CK3R commented Dec 2, 2023

What "name" did you give to Gitea in your settings? Looks like you used an invalid character there.

lunny pushed a commit that referenced this issue Dec 5, 2023
Fixes #28324

The name parameter can't contain some characters
(https://github.com/keybase/go-crypto/blob/master/openpgp/keys.go#L680)
but is optional. Therefore just use an empty string.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Dec 5, 2023
Fixes go-gitea#28324

The name parameter can't contain some characters
(https://github.com/keybase/go-crypto/blob/master/openpgp/keys.go#L680)
but is optional. Therefore just use an empty string.
pangliang pushed a commit to pangliang/gitea that referenced this issue Dec 5, 2023
Fixes go-gitea#28324

The name parameter can't contain some characters
(https://github.com/keybase/go-crypto/blob/master/openpgp/keys.go#L680)
but is optional. Therefore just use an empty string.
lunny pushed a commit that referenced this issue Dec 5, 2023
Backport #28352 by @KN4CK3R

Fixes #28324

The name parameter can't contain some characters
(https://github.com/keybase/go-crypto/blob/master/openpgp/keys.go#L680)
but is optional. Therefore just use an empty string.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
@williamdes
Copy link
Author

What "name" did you give to Gitea in your settings? Looks like you used an invalid character there.

In my docker-compose it was set to: GITEA__APP_NAME: Datacenters Network Git (by Wdes SAS)

@williamdes
Copy link
Author

https://github.com/keybase/go-crypto/blob/de78d2cb44f4360c724f681478689e314d00bf96/openpgp/packet/userid.go#L33C16-L33C72

says:

// NewUserId returns a UserId or nil if any of the arguments contain invalid
// characters. The invalid characters are '\x00', '(', ')', '<' and '>'

fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this issue Jan 17, 2024
Fixes go-gitea#28324

The name parameter can't contain some characters
(https://github.com/keybase/go-crypto/blob/master/openpgp/keys.go#L680)
but is optional. Therefore just use an empty string.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2024
silverwind pushed a commit to silverwind/gitea that referenced this issue Feb 20, 2024
Fixes go-gitea#28324

The name parameter can't contain some characters
(https://github.com/keybase/go-crypto/blob/master/openpgp/keys.go#L680)
but is optional. Therefore just use an empty string.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants