mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Increase OAuth2 state parameter limit
This commit is contained in:
@@ -62,7 +62,7 @@ func (ad *AuthData) IsValid() *AppError {
|
||||
return NewAppError("AuthData.IsValid", "model.authorize.is_valid.redirect_uri.app_error", nil, "client_id="+ad.ClientId, http.StatusBadRequest)
|
||||
}
|
||||
|
||||
if len(ad.State) > 128 {
|
||||
if len(ad.State) > 1024 {
|
||||
return NewAppError("AuthData.IsValid", "model.authorize.is_valid.state.app_error", nil, "client_id="+ad.ClientId, http.StatusBadRequest)
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ func TestAuthIsValid(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
ad.Scope = NewRandomString(129)
|
||||
ad.Scope = NewRandomString(1025)
|
||||
if err := ad.IsValid(); err == nil {
|
||||
t.Fatal("Should have failed invalid Scope")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user