recaptcha 4.13.2 → 4.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/recaptcha/verify.rb +2 -1
- 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: 9b5ffc9bf0c060fee8d77fd96405cfe4a4b9a023663a28ad81a908e674ad6674
|
4
|
+
data.tar.gz: 958f628e01e816b2d27f7fccad2f0c7e14e701789093ee856316738b5b4810d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1f835a629b92c10e4250d89db0f8717a5a6907f631a97ef90c0989b2d97875c9cffd81559872d7c025dd86c0a53e301bdd4ee9c60d745070cf4bfce8c24049e
|
7
|
+
data.tar.gz: 361b8d29ab4b9201faf4e6c87cc7bf35043915cebb4714b2c6f4424214476cef96dfe7c9707b8ffb63e7ea320dccf324ba2759b62c5344e48942647de718638e
|
data/lib/recaptcha/verify.rb
CHANGED
@@ -4,6 +4,7 @@ require 'json'
|
|
4
4
|
|
5
5
|
module Recaptcha
|
6
6
|
module Verify
|
7
|
+
G_RESPONSE_LIMIT = 4000
|
7
8
|
# Your private API can be specified in the +options+ hash or preferably
|
8
9
|
# using the Configuration.
|
9
10
|
def verify_recaptcha(options = {})
|
@@ -15,7 +16,7 @@ module Recaptcha
|
|
15
16
|
recaptcha_response = options[:response] || params['g-recaptcha-response'].to_s
|
16
17
|
|
17
18
|
begin
|
18
|
-
verified = if recaptcha_response.empty?
|
19
|
+
verified = if recaptcha_response.empty? || recaptcha_response.length > G_RESPONSE_LIMIT
|
19
20
|
false
|
20
21
|
else
|
21
22
|
recaptcha_verify_via_api_call(request, recaptcha_response, options)
|
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: 4.
|
4
|
+
version: 4.14.0
|
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: 2019-
|
11
|
+
date: 2019-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|