recaptcha 5.4.0 → 5.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2f048639c2186d2b96ee2ee90a94b928443be2d068e9a4cb5fc3c840f0b2673
4
- data.tar.gz: 35215a7a9ebdceba2512c01c5d52a19cdf0afb1763045222a81e1a7203771793
3
+ metadata.gz: 9cf7aba9fe655e310a8fade5586b0c99ec18050fb0e1c5e41947d721f7b54f4b
4
+ data.tar.gz: 1c8e6a634ca69c6e2d783d4fa01cc683fc52ac4a66e6f00dccfa52e0ff953daf
5
5
  SHA512:
6
- metadata.gz: fc3b564d5f7825ee75f1c5cad3df00f7712b7076a2616f4f8b4bd7ca14ee33d0fa7063555a0544773bf4796922a3a9672ab14b1fc53e29920ff5bfeb956f9f57
7
- data.tar.gz: e2c2a17557f57ac6343cce586e002647c8e70136786fd3660f60ed4dba6f689761935c883ea37b9adbae1829d4187c28fe7e3467bebc35670e27ee371aecad0b
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'] should either be a
74
- # string or a hash with the action name(s) as keys. If it is a hash, then `action` is used as
75
- # the key.
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Recaptcha
4
- VERSION = '5.4.0'
4
+ VERSION = '5.4.1'
5
5
  end
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.0
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-15 00:00:00.000000000 Z
11
+ date: 2020-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json