Allow a password that contains colons

Allow a password that contains colons in the basic autentication.
This commit is contained in:
Masahiro Namba
2015-04-01 02:11:05 +09:00
parent 48f0116358
commit d6817796b3

View File

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