Merge pull request #690 from noc06140728/fix-basic-auth

Allow a password that contains colons
This commit is contained in:
Naoki Takezoe
2015-04-05 17:04:43 +09:00

View File

@@ -40,7 +40,7 @@ class BasicAuthenticationFilter extends Filter with RepositoryService with Accou
} else { } else {
request.getHeader("Authorization") match { request.getHeader("Authorization") match {
case null => requireAuth(response) case null => requireAuth(response)
case auth => decodeAuthHeader(auth).split(":") match { case auth => decodeAuthHeader(auth).split(":", 2) match {
case Array(username, password) => { case Array(username, password) => {
authenticate(settings, username, password) match { authenticate(settings, username, password) match {
case Some(account) if (isUpdating || repository.repository.isPrivate) => { case Some(account) if (isUpdating || repository.repository.isPrivate) => {