Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork6.3k
Disable unnecessary OpenID/OAuth2 elements#18491
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This mod fixes disabling unnecessary OpenID elements.Related:go-gitea#13129Author-Change-Id: IB#1115256
routers/web/web.go Outdated
| m.Post("/link_account_signup",bindIgnErr(forms.RegisterForm{}),auth.LinkAccountPostRegister) | ||
| m.Group("/link_account",func() { | ||
| m.Get("",auth.LinkAccount) | ||
| },openIDSignInEnabled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
openIDSignInEnabled can be added to theGet andPost arguments, no need to go all fancy withGroup here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Just tested that
m.Get("/", Home, openIDSignInEnabled)does not forbid access to / when openIDSignInEnabled is disabled but
m.Group("/", func() {m.Get("", Home)}, openIDSignInEnabled)does. Seems that simply addingopenIDSignInEnabled toGet arguments does not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
m.Get("/", openIDSignInEnabled, Home)works ok - will fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Done.
Fixes:8faceacRelated:go-gitea#18491 (review)Author-Change-Id: IB#1115256
lunny left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LinkAccount is not only for openID, OAuth2 could also use that. This is totally wrong.
Fixes:8faceacRelated:go-gitea#18491 (review)Author-Change-Id: IB#1115256
pboguslawski commentedFeb 2, 2022
Fixed in513303b. |
* giteaofficial/main: Fix issue with docker-rootless shimming script (go-gitea#18690) tests: remove redundant comparison in repo dump/restore (go-gitea#18660) [skip ci] Updated translations via Crowdin Disable unnecessary OpenID/OAuth2 elements (go-gitea#18491) Add apply-patch, basic revert and cherry-pick functionality (go-gitea#17902) C preprocessor colors improvement (go-gitea#18671) Update object repo with the migrated repository (go-gitea#18684)
This mod fixes disabling unnecessary OpenID elements.Related:go-gitea#13129Author-Change-Id: IB#1115256
wxiaoguang commentedOct 25, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@pboguslawski this change (maybe) causes regressions like:
Could you propose a proper fix? (I will propose a quick fix to revert this PR for a temp approach) |
Uh oh!
There was an error while loading.Please reload this page.
This mod fixes disabling unnecessary OpenID/OAuth2 elements.
Related:#13129
Author-Change-Id: IB#1115256