rucaptcha 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +4 -1
- data/config/locales/rucaptcha.en.yml +1 -1
- data/config/locales/rucaptcha.zh-CN.yml +1 -1
- data/config/locales/rucaptcha.zh-TW.yml +1 -1
- data/lib/rucaptcha.rb +1 -1
- data/lib/rucaptcha/errors/configuration.rb +1 -1
- data/lib/rucaptcha/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1227ac3cddd33c720c502742d2b51f84848095a6900122f514a68f3232180b00
|
4
|
+
data.tar.gz: '060499d4233c5582694dbed3777abc379d125bf504146eb76017cba72e0653df'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 342336cf360865fb339db4d66711c63e6f23a95c653e45959e24dd19958f2136f556f4b192084c6899d89fac5af671eb644cbf85ad05b86b501ab0be50817d2e
|
7
|
+
data.tar.gz: f376f57f2cc3fb062dcc41ca608c0d03963447e88ff5edd011c9b0678d82f0cd2554459c284d2611b0e9156fc850a5a85c57d49aae2f35a7730638879c7ac4e9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,6 +5,9 @@
|
|
5
5
|
|
6
6
|
This is a Captcha gem for Rails Applications which generates captcha image by C code.
|
7
7
|
|
8
|
+
> NOTE: According to the use of Ruby China, the verification code looks like has a lower than 5% probability of being parsed by OCR and the verification code is cracked. It is recommended that you use the IP rate limit to enhance the protection.
|
9
|
+
> NOTE: 以 Ruby China 的使用来看,验证码似乎有低于 5% 的概率被 OCR 读取解析导致验证码被破解(我们从日志分析绝大多数是成功的,但偶尔一个成功,配合大量机器攻击,导致注册了很多的垃圾账号),建议你额外配合 IP 频率限制的功能来加强保护。
|
10
|
+
|
8
11
|
[中文介绍和使用说明](https://ruby-china.org/topics/27832)
|
9
12
|
|
10
13
|
## Example
|
@@ -47,7 +50,7 @@ RuCaptcha.configure do
|
|
47
50
|
# self.length = 5
|
48
51
|
# enable/disable Strikethrough.
|
49
52
|
# self.strikethrough = true
|
50
|
-
# enable/disable Outline style
|
53
|
+
# enable/disable Outline style
|
51
54
|
# self.outline = false
|
52
55
|
end
|
53
56
|
```
|
data/lib/rucaptcha.rb
CHANGED
@@ -40,7 +40,7 @@ module RuCaptcha
|
|
40
40
|
length = config.length
|
41
41
|
|
42
42
|
unless length.in?(3..7)
|
43
|
-
raise
|
43
|
+
raise RuCaptcha::Errors::Configuration, 'length config error, value must in 3..7'
|
44
44
|
end
|
45
45
|
|
46
46
|
strikethrough = config.strikethrough ? 1 : 0
|
data/lib/rucaptcha/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rucaptcha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
|
-
rubygems_version: 3.0.
|
87
|
+
rubygems_version: 3.0.3
|
88
88
|
signing_key:
|
89
89
|
specification_version: 4
|
90
90
|
summary: This is a Captcha gem for Rails Applications. It drawing captcha image with
|