]> git.openstreetmap.org Git - rails.git/commitdiff
Make passwords with a colon in them work.
authorTom Hughes <tom@compton.nu>
Wed, 27 Jun 2007 18:46:23 +0000 (18:46 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 27 Jun 2007 18:46:23 +0000 (18:46 +0000)
app/controllers/application.rb

index 72938409625315eb92b677a19aaa086bee9a773e..792792f8375008db48c7c2987aa1fe870ee7b4fd 100644 (file)
@@ -59,7 +59,7 @@ class ApplicationController < ActionController::Base
     end 
     # only basic authentication supported
     if authdata and authdata[0] == 'Basic' 
-      user, pass = Base64.decode64(authdata[1]).split(':')[0..1] 
+      user, pass = Base64.decode64(authdata[1]).split(':',2)
     end 
     return [user, pass] 
   end