X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7531060a12fcdcadc05cba4e2bf803a87bab66f1..77f9aec772eb4bb1a413e310dd30a8532dccab5c:/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)