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

Send 404 on /{org}.gpg #18959

Merged
merged 4 commits into from Mar 2, 2022
Merged

Send 404 on /{org}.gpg #18959

merged 4 commits into from Mar 2, 2022

Conversation

Gusted
Copy link
Contributor

@Gusted Gusted commented Mar 1, 2022

- Organisation's currently cannot have any GPG/SSH keys, so send 404
status instead of a internal server error.
- Resolves go-gitea#18952
@Gusted Gusted added this to the 1.17.0 milestone Mar 1, 2022
@KN4CK3R
Copy link
Member

KN4CK3R commented Mar 1, 2022

Accidently fixed in #18798 too. In that case an invalid response is generated. I think there should be an if len(keys) == 0 { 404 } in ShowGPGKeys (and in ShowSSHKeys?) too.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 1, 2022
@Gusted
Copy link
Contributor Author

Gusted commented Mar 1, 2022

I think there should be an if len(keys) == 0 { 404 } in ShowGPGKeys (and in ShowSSHKeys?) too.

Yeah it should be, as it shouldn't send invalid keys... Does it bother your PR if that's also fixed in this PR? Otherwise I will give a look over your PR and close this one.

@KN4CK3R
Copy link
Member

KN4CK3R commented Mar 1, 2022

The problem is the indirect User->Org redirect in user.Profile. With my PR there is no redirect for the .gpg and .keys routes anymore so the change from this PR would be obsolete. But my PR "depends" on #18871 and #18872. So if we want this fixed fast we can use your PR. (I could remove the changes then again in my PR.)

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 1, 2022
@KN4CK3R
Copy link
Member

KN4CK3R commented Mar 1, 2022

I added another PR for the invalid response: #18961

Gusted added a commit to Gusted/gitea that referenced this pull request Mar 1, 2022
@Gusted Gusted added the backport/done All backports for this PR have been created label Mar 1, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 1, 2022
@techknowlogick techknowlogick merged commit a90041d into go-gitea:main Mar 2, 2022
techknowlogick pushed a commit that referenced this pull request Mar 2, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 2, 2022
* giteaofficial/main:
  Send 404 on `/{org}.gpg` (go-gitea#18959)
  Accounts with WebAuthn only (no TOTP) now exist ... fix code to handle that case (go-gitea#18897)
  Fix lfs management setting (go-gitea#18946)
  Fix admin user list pagination (go-gitea#18957)
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

500 on organization.gpg request
6 participants