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

500 error on deleting account #8369

Closed
2 of 7 tasks
bmerrison opened this issue Oct 3, 2019 · 1 comment · Fixed by #8486
Closed
2 of 7 tasks

500 error on deleting account #8369

bmerrison opened this issue Oct 3, 2019 · 1 comment · Fixed by #8486
Labels
issue/regression Indicates a previously functioning feature or behavior that has broken or regressed after a change type/bug
Milestone

Comments

@bmerrison
Copy link

Description

After deploying Gitea on a clean machine, with SSH and HTTPS disabled, we get a 500 error when a user attempts to delete their account. See the gist above for a syslog snippet from immediately after the request.

Attempting to delete the user from the admin page also fails, although it doesn't display a 500 error - just doesn't do anything.

After a bit of investigation we found that the user that Gitea is running as doesn't have a .ssh directory in their homedir. This causes the error [re-]generating authorized_keys seen at the end of the log. Creating the directory manually fixes the issue.

This has only become an issue since upgrading from 1.8.0 to 1.9.3. We wondered if the problem could be somehow related to the move away from sshkeygen here: https://github.com/go-gitea/gitea/pull/7128/files

@zeripath
Copy link
Contributor

I think you're right it's very likely secondary to that change and we should be just creating the directory if it doesn't exist.

@zeripath zeripath added type/bug issue/regression Indicates a previously functioning feature or behavior that has broken or regressed after a change labels Oct 13, 2019
@lafriks lafriks added this to the 1.9.5 milestone Oct 13, 2019
lafriks pushed a commit that referenced this issue Oct 13, 2019
* Ensure .ssh dir exists before rewriting public keys

* Ensure .ssh dir exists before appending to authorized_keys

* Log the error because it would be useful to know where it is trying to MkdirAll

* Only try to create RootPath if it's not empty
zeripath added a commit to zeripath/gitea that referenced this issue Oct 13, 2019
* Ensure .ssh dir exists before rewriting public keys

* Ensure .ssh dir exists before appending to authorized_keys

* Log the error because it would be useful to know where it is trying to MkdirAll

* Only try to create RootPath if it's not empty
lafriks pushed a commit that referenced this issue Oct 13, 2019
* Ensure .ssh dir exists before rewriting public keys

* Ensure .ssh dir exists before appending to authorized_keys

* Log the error because it would be useful to know where it is trying to MkdirAll

* Only try to create RootPath if it's not empty
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/regression Indicates a previously functioning feature or behavior that has broken or regressed after a change type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants