recaptcha 4.13.2 → 4.14.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '07158725ab583ee76878eeede35d0fec7236521108d3bb4144effd33afc5ac0a'
4
- data.tar.gz: b67aac782eeb421223dd1722b29c299b4904552b44cbe5024b2bfdd658618557
3
+ metadata.gz: 9b5ffc9bf0c060fee8d77fd96405cfe4a4b9a023663a28ad81a908e674ad6674
4
+ data.tar.gz: 958f628e01e816b2d27f7fccad2f0c7e14e701789093ee856316738b5b4810d6
5
5
  SHA512:
6
- metadata.gz: 711e18e63ca446ed58f2880061bee2a8d3ceb82d6397af20995bc9e0a77a8d336896a26853da0e04ff7ba8e2d04c29b7371bc375ea1487a8d9ed4c72866386e0
7
- data.tar.gz: f77f7cc4d1a558d30191ad74d61b6f19b91be856e2fc2e28a78e6f0cc1a45285f3c915e2d9eb7307b5bcfc717a3834f6f555b3b5e5a5744d9fd10696e50f2fcc
6
+ metadata.gz: f1f835a629b92c10e4250d89db0f8717a5a6907f631a97ef90c0989b2d97875c9cffd81559872d7c025dd86c0a53e301bdd4ee9c60d745070cf4bfce8c24049e
7
+ data.tar.gz: 361b8d29ab4b9201faf4e6c87cc7bf35043915cebb4714b2c6f4424214476cef96dfe7c9707b8ffb63e7ea320dccf324ba2759b62c5344e48942647de718638e
@@ -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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Recaptcha
4
- VERSION = '4.13.2'
4
+ VERSION = '4.14.0'
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: 4.13.2
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-03-24 00:00:00.000000000 Z
11
+ date: 2019-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json