only allow sessionStorage and localStorage

This commit is contained in:
Konstantin Haase 2012-12-06 14:44:00 +01:00
parent 3eb4c04f11
commit f6c983978f

View File

@ -20,7 +20,7 @@ module Travis
request = Rack::Request.new(env)
token, user, storage = request.params.values_at('token', 'user', 'storage')
if token =~ /\A[a-zA-Z\-_\d]+\Z/
storage = 'sessionStorage' if storage.to_s.empty?
storage = 'sessionStorage' if storage != 'localStorage'
[storage, token, user, request.fullpath]
end
end