]> git.openstreetmap.org Git - rails.git/commitdiff
fix user:pass auth for Potlatch
authorRichard Fairhurst <richard@systemed.net>
Thu, 26 Mar 2009 09:38:11 +0000 (09:38 +0000)
committerRichard Fairhurst <richard@systemed.net>
Thu, 26 Mar 2009 09:38:11 +0000 (09:38 +0000)
app/controllers/amf_controller.rb

index febc4db68cc6a1464e02c00bd504e739f4a587fd..03d952b9660ca363e9e3a368f063710922ee944f 100644 (file)
@@ -524,10 +524,10 @@ class AmfController < ApplicationController
   end
 
   # Authenticate token
-  # (could be removed if no-one uses the username+password form)
+  # (can also be of form user:pass)
 
   def getuserid(token) #:doc:
-       if (token =~ /^(.+)\+(.+)$/) then
+       if (token =~ /^(.+)\:(.+)$/) then
          user = User.authenticate(:username => $1, :password => $2)
        else
          user = User.authenticate(:token => token)