-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Disable unnecessary OpenID/OAuth2 elements #18491
Conversation
This mod fixes disabling unnecessary OpenID elements. Related: go-gitea#13129 Author-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 the Get
and Post
arguments, no need to go all fancy with Group
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 adding openIDSignInEnabled
to Get
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: 8faceac Related: go-gitea#18491 (review) Author-Change-Id: IB#1115256
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: 8faceac Related: go-gitea#18491 (review) Author-Change-Id: IB#1115256
Fixed in 513303b. |
* 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#13129 Author-Change-Id: IB#1115256
This mod fixes disabling unnecessary OpenID/OAuth2 elements.
Related: #13129
Author-Change-Id: IB#1115256