X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ff7ddb6b86bf918a9418af7382836b41594d45e4..96ee7ef95c434df4ba9bb5d02257a8355c0b6f50:/app/controllers/api/amf_controller.rb diff --git a/app/controllers/api/amf_controller.rb b/app/controllers/api/amf_controller.rb index db8982d43..c05a13098 100644 --- a/app/controllers/api/amf_controller.rb +++ b/app/controllers/api/amf_controller.rb @@ -868,7 +868,7 @@ module Api # not just the id, hence this abstraction def getuser(token) - if token =~ /^(.+)\:(.+)$/ + if token =~ /^(.+):(.+)$/ User.authenticate(:username => Regexp.last_match(1), :password => Regexp.last_match(2)) else User.authenticate(:token => token)