From: Richard Fairhurst Date: Thu, 26 Mar 2009 09:38:11 +0000 (+0000) Subject: fix user:pass auth for Potlatch X-Git-Tag: live~8133 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/023b9e3662a590b2b8ecb685d4e4eafb8a327964?hp=9752466c0342700ebef5a7741e9105f44957a82a fix user:pass auth for Potlatch --- diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index febc4db68..03d952b96 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -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)