recaptcha 5.4.0 → 5.4.1
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/recaptcha/adapters/controller_methods.rb +5 -4
- data/lib/recaptcha/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9cf7aba9fe655e310a8fade5586b0c99ec18050fb0e1c5e41947d721f7b54f4b
|
|
4
|
+
data.tar.gz: 1c8e6a634ca69c6e2d783d4fa01cc683fc52ac4a66e6f00dccfa52e0ff953daf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 98f916ad8b9f4b6c5f688b4485e8e8d9df83b6585d077538e206246b4f0f8675c267f54fc99d235e863017f4622dbfb1a19a760a48366c5f50027bdc7a5e6041
|
|
7
|
+
data.tar.gz: 108bd19c3b2b539c69a3647234565eea43c4638afc37d0862d74c7bccf0a0e1a28f23d51284cf2f768d55b23195ae9cc579f12b4948e86194bfdecd012d7dd29
|
|
@@ -70,12 +70,13 @@ module Recaptcha
|
|
|
70
70
|
request.respond_to?(:format) && request.format == :html && respond_to?(:flash)
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
-
# Extracts response token from params. params['g-recaptcha-response']
|
|
74
|
-
#
|
|
75
|
-
# the
|
|
73
|
+
# Extracts response token from params. params['g-recaptcha-response-data'] for recaptcha_v3 or
|
|
74
|
+
# params['g-recaptcha-response'] for recaptcha_tags and invisible_recaptcha_tags and should
|
|
75
|
+
# either be a string or a hash with the action name(s) as keys. If it is a hash, then `action`
|
|
76
|
+
# is used as the key.
|
|
76
77
|
# @return [String] A response token if one was passed in the params; otherwise, `''`
|
|
77
78
|
def recaptcha_response_token(action = nil)
|
|
78
|
-
response_param = params['g-recaptcha-response-data']
|
|
79
|
+
response_param = params['g-recaptcha-response-data'] || params['g-recaptcha-response']
|
|
79
80
|
if response_param&.respond_to?(:to_h) # Includes ActionController::Parameters
|
|
80
81
|
response_param[action].to_s
|
|
81
82
|
else
|
data/lib/recaptcha/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: recaptcha
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.4.
|
|
4
|
+
version: 5.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason L Perry
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-03-
|
|
11
|
+
date: 2020-03-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|