[bugfix] Fix '+'-separated scopes not being recognized (#4028)

* [bugfix] Fix '+'-separated scopes not being recognized

* comment
This commit is contained in:
tobi 2025-04-19 21:57:50 +02:00 committed by GitHub
commit e9f6d186dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 35 additions and 19 deletions

View file

@ -80,10 +80,12 @@ func (m *Module) TokenRevokePOSTHandler(c *gin.Context) {
return
}
// Don't set `binding:"required"` on these
// fields as we want to validate them ourself.
form := &struct {
ClientID string `form:"client_id" validate:"required"`
ClientSecret string `form:"client_secret" validate:"required"`
Token string `form:"token" validate:"required"`
ClientID string `form:"client_id"`
ClientSecret string `form:"client_secret"`
Token string `form:"token"`
}{}
if err := c.ShouldBind(form); err != nil {
errWithCode := gtserror.NewErrorBadRequest(err, err.Error())