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

Admin Authentication Sources pages show 500 error in some causes #19036

Closed
wxiaoguang opened this issue Mar 9, 2022 · 2 comments · Fixed by #19041
Closed

Admin Authentication Sources pages show 500 error in some causes #19036

wxiaoguang opened this issue Mar 9, 2022 · 2 comments · Fixed by #19041
Labels

Comments

@wxiaoguang
Copy link
Contributor

If there is an error occurs during add(new) (eg: duplicated name), then 500 error occurs during template rendering:

* template: admin/auth/new:17:68: executing "admin/auth/new" at <.type.Int>: can't evaluate field Int in type interface {}
* template: admin/auth/source/oauth:5:93: executing "admin/auth/source/oauth" at <.oauth2_provider.Name>: can't evaluate field Name in type interface {}

If the admin uses a duplicated name on the edit page, there is another 500:

* Error 1062: Duplicate entry 'aa' for key 'login_source.UQE_login_source_name'

In a word, the login source page is too complex and there are many bugs for edge cases.

@Javonne-liu
Copy link

I also reported an error of 500. How is this problem solved?

zeripath added a commit to zeripath/gitea that referenced this issue Mar 9, 2022
Fix go-gitea#19036

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath
Copy link
Contributor

zeripath commented Mar 9, 2022

@Javonne-do please provide the issue number of that.

6543 pushed a commit that referenced this issue Mar 10, 2022
Fix #19036

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this issue Mar 11, 2022
6543 pushed a commit that referenced this issue Mar 13, 2022
… (#19059)

Backport #19041

Fix #19036

Signed-off-by: Andrew Thornton <art27@cantab.net>
Chianina pushed a commit to Chianina/gitea that referenced this issue 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants