shugoi 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/shugoi/core.rb +2 -2
- data/lib/shugoi/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d67dd6c94281f37e1991aeee7619e56094b865d2a4af684b9a998f1900d9a402
|
|
4
|
+
data.tar.gz: 17c98240abde4f8ad2429e276816e8fb77ae86732d3c6d4957cf8abab0b61622
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f704301cd98d98da245d31de729da7bab4a2387e001b7cddd514a2d2a653f7d4022069548068b1d3b3c54d6ec5127fd8bf342d5d25d4f67aec22018629c0025
|
|
7
|
+
data.tar.gz: f190ad50e6be8fefc96513cbf925aca508cfba94aea5117ce990a1ac1d6380ff78257a57f643140d7b1c769f6bb22ede6a4ad7f7fcf98ce97fc916f29985059b
|
data/lib/shugoi/core.rb
CHANGED
|
@@ -54,7 +54,7 @@ module Shugoi
|
|
|
54
54
|
return nil if path.include?("/__shugoi/") || path.start_with?("/api/")
|
|
55
55
|
ua = ctx[:ua].to_s
|
|
56
56
|
|
|
57
|
-
if
|
|
57
|
+
if !@config.signing_secret.to_s.empty?
|
|
58
58
|
proof = ctx[:sg_proof].to_s
|
|
59
59
|
valid_proof = !proof.empty? && @pow.valid?(proof)
|
|
60
60
|
# Re-audit (résidu #3) : un cookie __sg_ok valide (HMAC serveur, 30 j) saute le
|
|
@@ -115,7 +115,7 @@ module Shugoi
|
|
|
115
115
|
return true unless @bot_verifier
|
|
116
116
|
|
|
117
117
|
verified = @bot_verifier.verify(ua, ip)
|
|
118
|
-
verified.nil? ?
|
|
118
|
+
verified.nil? ? false : verified
|
|
119
119
|
end
|
|
120
120
|
|
|
121
121
|
# Page challenge (tableau en commentaire + JS PoW inline).
|
data/lib/shugoi/version.rb
CHANGED