fix: check for empty applicationID on assertRoles (#5509)

* fix: check for empty applicationID on assertRoles

* remove unintended added file
This commit is contained in:
Livio Spring 2023-03-21 08:59:44 +01:00 committed by GitHub
parent 4baa503fcc
commit 4ca50e0802
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -635,6 +635,9 @@ func (o *OPStorage) privateClaimsFlows(ctx context.Context, userID string, userG
}
func (o *OPStorage) assertRoles(ctx context.Context, userID, applicationID string, requestedRoles []string) (*query.UserGrants, map[string]map[string]string, error) {
if applicationID == "" || len(requestedRoles) == 0 {
return nil, nil, nil
}
projectID, err := o.query.ProjectIDFromClientID(ctx, applicationID, false)
if err != nil {
return nil, nil, err