rucaptcha 2.3.1 → 2.3.2
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 +1 -1
- data/ext/rucaptcha/colors.h +32 -32
- data/lib/rucaptcha/controller_helpers.rb +4 -1
- data/lib/rucaptcha/version.rb +1 -1
- data/lib/rucaptcha/view_helpers.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: 2a8c1de1ba0dfa866fb32ad0a56fe9a07a74986f6d849620b456b94d43031469
|
4
|
+
data.tar.gz: 5089e1997cf65943e217b4a9926da4788d463f1eda3406c3b092039fe93697d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d83740e79db780c3d2c08ebe48da44795e60b946810c5afd9e0943d1889ab8dff7619f0fdbf4125293e688e9941fb1bf61c02b49e25d55927ce528e25843044b
|
7
|
+
data.tar.gz: 87e905b2138f4fe1f1a11375de13e7901801364b4551403953768e8e8ca0d48351cc628fa59d4deaedb6695d227fcf07bb0fd44aa1b2d3963463d1af4cd89fb1
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -9,7 +9,7 @@ This is a Captcha gem for Rails Applications which generates captcha image by C
|
|
9
9
|
|
10
10
|
## Example
|
11
11
|
|
12
|
-
<img src="https://user-images.githubusercontent.com/5518/
|
12
|
+
<img src="https://user-images.githubusercontent.com/5518/49985459-f8492f80-ffa6-11e8-9ef5-8f8f522e4707.png" width="579px" />
|
13
13
|
|
14
14
|
## Feature
|
15
15
|
|
data/ext/rucaptcha/colors.h
CHANGED
@@ -78,41 +78,41 @@ static char *colors[] = {
|
|
78
78
|
"\x29\x62\xFF"
|
79
79
|
"\xff\xff\xff" "," "\0\0\0\0" "\xc8\0\x46\0" "\0" "\x04",
|
80
80
|
|
81
|
-
//
|
81
|
+
// Pink A700 #C51162
|
82
82
|
"GIF89a" "\xc8\0\x46\0" "\x83" "\0\0"
|
83
|
-
"\
|
84
|
-
"\
|
85
|
-
"\
|
86
|
-
"\
|
87
|
-
"\
|
88
|
-
"\
|
89
|
-
"\
|
90
|
-
"\
|
91
|
-
"\
|
92
|
-
"\
|
93
|
-
"\
|
94
|
-
"\
|
95
|
-
"\
|
96
|
-
"\
|
97
|
-
"\
|
83
|
+
"\xC5\x11\x62"
|
84
|
+
"\xC5\x11\x62"
|
85
|
+
"\xC5\x11\x62"
|
86
|
+
"\xC5\x11\x62"
|
87
|
+
"\xC5\x11\x62"
|
88
|
+
"\xC5\x11\x62"
|
89
|
+
"\xC5\x11\x62"
|
90
|
+
"\xC5\x11\x62"
|
91
|
+
"\xC5\x11\x62"
|
92
|
+
"\xC5\x11\x62"
|
93
|
+
"\xC5\x11\x62"
|
94
|
+
"\xC5\x11\x62"
|
95
|
+
"\xC5\x11\x62"
|
96
|
+
"\xC5\x11\x62"
|
97
|
+
"\xC5\x11\x62"
|
98
98
|
"\xff\xff\xff" "," "\0\0\0\0" "\xc8\0\x46\0" "\0" "\x04",
|
99
99
|
|
100
|
-
//
|
100
|
+
// Deep Purple A700 #6200EA
|
101
101
|
"GIF89a" "\xc8\0\x46\0" "\x83" "\0\0"
|
102
|
-
"\
|
103
|
-
"\
|
104
|
-
"\
|
105
|
-
"\
|
106
|
-
"\
|
107
|
-
"\
|
108
|
-
"\
|
109
|
-
"\
|
110
|
-
"\
|
111
|
-
"\
|
112
|
-
"\
|
113
|
-
"\
|
114
|
-
"\
|
115
|
-
"\
|
116
|
-
"\
|
102
|
+
"\x62\x00\xEA"
|
103
|
+
"\x62\x00\xEA"
|
104
|
+
"\x62\x00\xEA"
|
105
|
+
"\x62\x00\xEA"
|
106
|
+
"\x62\x00\xEA"
|
107
|
+
"\x62\x00\xEA"
|
108
|
+
"\x62\x00\xEA"
|
109
|
+
"\x62\x00\xEA"
|
110
|
+
"\x62\x00\xEA"
|
111
|
+
"\x62\x00\xEA"
|
112
|
+
"\x62\x00\xEA"
|
113
|
+
"\x62\x00\xEA"
|
114
|
+
"\x62\x00\xEA"
|
115
|
+
"\x62\x00\xEA"
|
116
|
+
"\x62\x00\xEA"
|
117
117
|
"\xff\xff\xff" "," "\0\0\0\0" "\xc8\0\x46\0" "\0" "\x04"
|
118
118
|
};
|
@@ -29,12 +29,15 @@ module RuCaptcha
|
|
29
29
|
# params:
|
30
30
|
# resource - [optional] a ActiveModel object, if given will add validation error message to object.
|
31
31
|
# :keep_session - if true, RuCaptcha will not delete the captcha code session.
|
32
|
+
# :captcha - if given, the value of it will be used to verify the captcha,
|
33
|
+
# if do not give or blank, the value of params[:_rucaptcha] will be used to verify the captcha
|
32
34
|
#
|
33
35
|
# exmaples:
|
34
36
|
#
|
35
37
|
# verify_rucaptcha?
|
36
38
|
# verify_rucaptcha?(user, keep_session: true)
|
37
39
|
# verify_rucaptcha?(nil, keep_session: true)
|
40
|
+
# verify_rucaptcha?(nil, captcha: params[:user][:captcha])
|
38
41
|
#
|
39
42
|
def verify_rucaptcha?(resource = nil, opts = {})
|
40
43
|
opts ||= {}
|
@@ -54,7 +57,7 @@ module RuCaptcha
|
|
54
57
|
end
|
55
58
|
|
56
59
|
# Make sure parama have captcha
|
57
|
-
captcha = (params[:_rucaptcha] || '').downcase.strip
|
60
|
+
captcha = (opts[:captcha] || params[:_rucaptcha] || '').downcase.strip
|
58
61
|
if captcha.blank?
|
59
62
|
return add_rucaptcha_validation_error
|
60
63
|
end
|
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.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
87
|
rubyforge_project:
|
88
|
-
rubygems_version: 2.7.
|
88
|
+
rubygems_version: 2.7.8
|
89
89
|
signing_key:
|
90
90
|
specification_version: 4
|
91
91
|
summary: This is a Captcha gem for Rails Applications. It drawing captcha image with
|