only split Authorization value at first colon
This commit is contained in:
parent
4bac9328b6
commit
7d322e75af
|
@ -100,7 +100,7 @@ final class SecurityApi(
|
|||
case class BasicAuth(username: String, password: User.ClearPassword)
|
||||
|
||||
def reqBasicAuth(req: RequestHeader): Option[BasicAuth] =
|
||||
req.headers get "Authorization" flatMap lila.common.String.base64.decode map (_ split ':') collect {
|
||||
req.headers get "Authorization" flatMap lila.common.String.base64.decode map (_.split(":", 2)) collect {
|
||||
case Array(username, password) => BasicAuth(username, User.ClearPassword(password))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue