-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 Internal server error on /admin/emails
#16312
Comments
As a sanity check, I ran that SQL command (corrected) and it works:
But the incorrect one printed in the logs does not:
|
Ah user need to be escaped |
Wana send a pull to fix Line 319?
|
Sure! |
@adyanth did create a test instance with postgress and i do not get a 500. would be good if you can test this change on your installation first. If it fixes it we can put it in :) |
@6543 will create a test instance and check too. What else can I enable to see why atleast mine is running into it? |
Same issue on my side. I've set the sql query to be outputted to log and try the query directly on the database. I needed to escape user so that the query succeed. I think it's this commit who introduce the issue : b9d611e#diff-88af2d242341edbdb69e8e6c0b47f3ee9329ce057bdc239f1fe484d93f46bda4L348 The function was rewritten. |
@6543 a fresh compose setup with a new DB resulted in a 500 after the 1st login and going to /admin/emails. Are you using the gitea:latest from docker? Fresh repro:
Will try the fix locally and update |
Here is after the change:
Fixes it. Will submit the PR. |
Checking the |
Fix #16312 Signed-off-by: Adyanth H <adyanthh@gmail.com>
Fix go-gitea#16312 Signed-off-by: Adyanth H <adyanthh@gmail.com>
[x]
):Description
I do not have an idea from when this started, since I rarely visit that URL. Today, when I did, I can see a 500 internal server error.
From the debug logging for SQL, I can see that the 1st line where
user."type"
seems to be wrong? and should have been"user"."type"
?This is the closest I can see in code:
gitea/models/user_mail.go
Line 319 in 1bfb0a2
Screenshots
Sample of what I see, a generic 500 page.
The text was updated successfully, but these errors were encountered: