active_hashcash 0.1.0 → 0.1.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 +4 -0
- data/README.md +2 -2
- data/lib/active_hashcash.rb +2 -2
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a52910cc5af45ca4b31ce6af112ce45a4ec401e584d80076aa50247f9dfc154
|
4
|
+
data.tar.gz: 03ca632ff343a29d9841cb950684c693b4d7684b1bd42251731fea8f8f1c36c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2758deaf12537653c08a27a988aa18e13449975caaf73e854a39ad5011eca63430ac1eb019d9dc5bb66d415a0d8975a0908c833056d0422fdf8a1b192d3316e
|
7
|
+
data.tar.gz: 579afe8ab7e448ffd550882fad8b4c8e724be3ec5ab043aac57c49463097a738cf66fd9700193d4f418a01f6ffb03d29510d5593b4800c659548abce968f81fc
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<img align="right" width="200px" src="logo.png" alt="Active Hashcash logo"/>
|
4
4
|
|
5
|
-
ActiveHashcash protects your Rails application against DoS and bots.
|
5
|
+
ActiveHashcash protects your Rails application against brute force attacks, DoS and bots.
|
6
6
|
|
7
7
|
Hashcash is proof-of-work algorithm, invented by Adam Back in 1997, to protect systems against denial of service attacks.
|
8
8
|
ActiveHashcash is an easy way to protect any Rails application against brute force attacks and some bots.
|
@@ -16,7 +16,7 @@ The user submits the form, and the stamp is verified by the controller in a befo
|
|
16
16
|
|
17
17
|
It blocks bots that do not interpret JavaScript since the proof of work is not computed. For the more sophisticated bots, we are happy to slow them down.
|
18
18
|
|
19
|
-
Here is a [demo on a
|
19
|
+
Here is a [demo on a registration form](https://www.rorvswild.com/account/new) :
|
20
20
|
|
21
21
|
![Active Hashcash GIF preview](demo.gif)
|
22
22
|
|
data/lib/active_hashcash.rb
CHANGED
@@ -73,8 +73,8 @@ module ActiveHashcash
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def hashcash_stamp_is_valid?
|
76
|
-
stamp = Stamp.parse(hashcash_param)
|
77
|
-
stamp.valid? && stamp.bits >= hashcash_bits && stamp.parse_date >= Date.yesterday
|
76
|
+
stamp = hashcash_param && Stamp.parse(hashcash_param)
|
77
|
+
stamp && stamp.valid? && stamp.bits >= hashcash_bits && stamp.parse_date >= Date.yesterday
|
78
78
|
end
|
79
79
|
|
80
80
|
def hashcash_stamp_spent?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_hashcash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexis Bernard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -38,7 +38,8 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 5.2.0
|
41
|
-
description:
|
41
|
+
description: ActiveHashcash protects your Rails application against brute force attacks,
|
42
|
+
DoS and bots.
|
42
43
|
email:
|
43
44
|
- alexis@basesecrete.com
|
44
45
|
executables: []
|
@@ -75,5 +76,6 @@ requirements: []
|
|
75
76
|
rubygems_version: 3.2.22
|
76
77
|
signing_key:
|
77
78
|
specification_version: 4
|
78
|
-
summary:
|
79
|
+
summary: ActiveHashcash protects your Rails application against brute force attacks,
|
80
|
+
DoS and bots.
|
79
81
|
test_files: []
|