sq_auth 0.0.23 → 0.0.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,14 +8,13 @@ module SqAuth
8
8
 
9
9
  def self.alter_environment options={}
10
10
  # Sorry, Konstantin
11
- protection_module = Rack::Protection::RemoteToken
12
11
  except_host = options[:host]
13
- protection_module.class_exec(except_host) do |except|
14
- protection_module.const_set("HOST", except)
12
+ Rack::Protection::RemoteToken.class_exec(except_host) do |except|
13
+ Rack::Protection::RemoteToken.const_set("HOST", except)
15
14
  alias :old_accepts? :accepts?
16
15
  def accepts?(env)
17
16
  form_hash = Rack::Request.new(env).params
18
- if referrer(env) == protection_module::HOST && env["REQUEST_METHOD"] == "POST" && form_hash.keys.include?("sqauthsession")
17
+ if referrer(env) == Rack::Protection::RemoteToken::HOST && env["REQUEST_METHOD"] == "POST" && form_hash.keys.include?("sqauthsession")
19
18
  true
20
19
  else
21
20
  old_accepts?(env)
@@ -1,3 +1,3 @@
1
1
  module SqAuth
2
- VERSION = "0.0.23"
2
+ VERSION = "0.0.24"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sq_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23
4
+ version: 0.0.24
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: