X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2f419c7ab0425550146fb771a54b7ffece63c246..77f9aec772eb4bb1a413e310dd30a8532dccab5c:/app/controllers/api/amf_controller.rb?ds=sidebyside 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)