tkh_mailing_list 0.11.2 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/app/controllers/contacts_controller.rb +4 -3
- data/lib/tkh_mailing_list/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef53330b934a0733e06b8093b36dba90c46d7ff7
|
4
|
+
data.tar.gz: ddcd7052a086932aff05fcdebcf7651f70a60bbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86120c651d4089f0a9d0eb9192915d3769b9518b523c3a169f32fdf7a633a96e25a86a9098d9b9291e0e1b7a21245662f74c943be3f8c888879a55b10b23d980
|
7
|
+
data.tar.gz: 472534e3ed7f315b7c330fe18d7472b30d09cd5b27a0fb2423a12521ce7f653e2c5568a5156a7a8e565ee16c09682fcd714cbe242179bd2122b5cbc00a5307fe
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,16 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## 0.11.3
|
6
|
+
|
7
|
+
* Fixed the spam detection hidden honeypot measure. It was never working :-(
|
8
|
+
|
9
|
+
|
10
|
+
## 0.11.2
|
11
|
+
|
12
|
+
* The admin daily digest now sends a list of pending comments if any.
|
13
|
+
|
14
|
+
|
5
15
|
## 0.11.1.1
|
6
16
|
|
7
17
|
* Debugging the admin_mailers layout. Added stylesheet to asset pipeline
|
@@ -17,7 +17,8 @@ class ContactsController < ApplicationController
|
|
17
17
|
@contact = Contact.new(contact_params)
|
18
18
|
# the website form field is invisible to human visitors and works as
|
19
19
|
# a honeypot to spam robots
|
20
|
-
|
20
|
+
honeypotted = @contact.website.present?
|
21
|
+
saved = @contact.save unless honeypotted
|
21
22
|
# disabling this and replacing it with a daily digest
|
22
23
|
# this is to mitigate the pain associated with contact spams
|
23
24
|
# sent_email = send_message_to_admin(@contact)
|
@@ -34,7 +35,7 @@ class ContactsController < ApplicationController
|
|
34
35
|
# redirect_to :back
|
35
36
|
# end
|
36
37
|
|
37
|
-
if saved ||
|
38
|
+
if saved || honeypotted
|
38
39
|
redirect_to root_path, notice: t("contacts.create.notice")
|
39
40
|
else
|
40
41
|
redirect_to :back, alert: t('contacts.create.did_not_reach')
|
@@ -68,7 +69,7 @@ class ContactsController < ApplicationController
|
|
68
69
|
|
69
70
|
# Never trust parameters from the scary internet, only allow the white list through.
|
70
71
|
def contact_params
|
71
|
-
params.require(:contact).permit(:sender_name, :sender_email, :body)
|
72
|
+
params.require(:contact).permit(:sender_name, :sender_email, :body, :website)
|
72
73
|
end
|
73
74
|
|
74
75
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tkh_mailing_list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swami Atma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
149
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
150
|
+
rubygems_version: 2.2.2
|
151
151
|
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: This gem inherits from the tkh_authentication gem and allows administrators
|