Fix missing unescape of basic auth username
This commit is contained in:
parent
9202f93bc2
commit
ad53f3ab68
@ -36,6 +36,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
@ -289,6 +290,12 @@ func (m *iammiddleware) findIdentityFromBasicAuth(c echo.Context) (iamidentity.V
|
||||
}
|
||||
}
|
||||
|
||||
if name, err := url.QueryUnescape(username); err != nil {
|
||||
return nil, ErrBadRequest
|
||||
} else {
|
||||
username = name
|
||||
}
|
||||
|
||||
identity, err := m.iam.GetVerifier(username)
|
||||
if err != nil {
|
||||
m.logger.Debug().WithFields(log.Fields{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user