bot-away 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/bot-away.rb +1 -1
- data/lib/bot-away/action_view/helpers/instance_tag.rb +3 -3
- metadata +9 -23
data/History.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
=== 1.0.3 2010-06-13
|
2
|
+
* Bugfixes:
|
3
|
+
* Resolved: On or before Rails 2.3.8, honeypots were generated as escaped HTML. This was because Rails started
|
4
|
+
using ActiveSupport::SafeBuffer to generate the content, and Bot-Away did not. (It does now.)
|
5
|
+
|
1
6
|
=== 1.0.2 2010-04-02
|
2
7
|
* Bugfixes:
|
3
8
|
* Resolved: Would sometimes generate honeypot tabindex of 0 instead of -1, interfering with keyboard operations
|
data/lib/bot-away.rb
CHANGED
@@ -86,11 +86,11 @@ class ActionView::Helpers::InstanceTag
|
|
86
86
|
def disguise(element)
|
87
87
|
case rand(3)
|
88
88
|
when 0 # Hidden
|
89
|
-
"<div style='display:none;'>Leave this empty: #{element}</div>"
|
89
|
+
element.replace "<div style='display:none;'>Leave this empty: #{element}</div>"
|
90
90
|
when 1 # Off-screen
|
91
|
-
"<div style='position:absolute;left:-1000px;top:-1000px;'>Don't fill this in: #{element}</div>"
|
91
|
+
element.replace "<div style='position:absolute;left:-1000px;top:-1000px;'>Don't fill this in: #{element}</div>"
|
92
92
|
when 2 # Negligible size
|
93
|
-
"<div style='position:absolute;width:0px;height:1px;z-index:-1;color:transparent;overflow:hidden;'>Keep this blank: #{element}</div>"
|
93
|
+
element.replace "<div style='position:absolute;width:0px;height:1px;z-index:-1;color:transparent;overflow:hidden;'>Keep this blank: #{element}</div>"
|
94
94
|
else # this should never happen?
|
95
95
|
disguise(element)
|
96
96
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 3
|
9
|
+
version: 1.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Colin MacKenzie IV
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-06-13 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -55,38 +55,24 @@ dependencies:
|
|
55
55
|
segments:
|
56
56
|
- 2
|
57
57
|
- 0
|
58
|
-
-
|
59
|
-
version: 2.0.
|
58
|
+
- 4
|
59
|
+
version: 2.0.4
|
60
60
|
type: :development
|
61
61
|
version_requirements: *id003
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: gemcutter
|
64
|
-
prerelease: false
|
65
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
segments:
|
70
|
-
- 0
|
71
|
-
- 5
|
72
|
-
- 0
|
73
|
-
version: 0.5.0
|
74
|
-
type: :development
|
75
|
-
version_requirements: *id004
|
76
62
|
- !ruby/object:Gem::Dependency
|
77
63
|
name: hoe
|
78
64
|
prerelease: false
|
79
|
-
requirement: &
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
80
66
|
requirements:
|
81
67
|
- - ">="
|
82
68
|
- !ruby/object:Gem::Version
|
83
69
|
segments:
|
84
70
|
- 2
|
85
|
-
-
|
71
|
+
- 6
|
86
72
|
- 0
|
87
|
-
version: 2.
|
73
|
+
version: 2.6.0
|
88
74
|
type: :development
|
89
|
-
version_requirements: *
|
75
|
+
version_requirements: *id004
|
90
76
|
description: |-
|
91
77
|
Unobtrusively detects form submissions made by spambots, and silently drops those submissions. The key word here is
|
92
78
|
"unobtrusive" -- this is NOT a CAPTCHA. This is a transparent, modular implementation of the bot-catching techniques
|