trusty-cms 4.1.3 → 4.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/app/assets/javascripts/rad_social/rad_ajax_form.js +3 -0
- data/app/assets/javascripts/rad_social/rad_email.js +0 -1
- data/app/assets/javascripts/rad_social/rad_email_form.js +2 -7
- data/app/assets/stylesheets/rad_social/rad_screen.scss +0 -4
- data/app/controllers/social_mailer_controller.rb +0 -7
- data/app/views/rad_social_mailer/social_mail_form.html.haml +1 -3
- data/app/views/widget/_email_form.html.haml +0 -5
- data/lib/trusty_cms.rb +1 -1
- data/lib/trusty_cms/engine.rb +0 -1
- data/trusty_cms.gemspec +1 -1
- metadata +10 -5
- data/app/assets/javascripts/rad_social/captcha.js +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '06485f3b9ed1c9ca511e064801b64e301c62a152a1da3ad7902215ab146f6c0d'
|
4
|
+
data.tar.gz: f2c25843032b941ffb0f1b7cb8920b07298ab131f626b2bd4cab6aee580a61e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3660bb986c773d9e81821660898e04af9c985297acfd8bc2a57c4623f931b9636dc4f628176e370a46d3676608f9778b476ff9a21e1d775587c2739755f6873
|
7
|
+
data.tar.gz: 23246702302f14f37569aa164467d76f771df08a562a1f7c2dc773a85308ab2abcfd81e7343f68bf4f4cab92c2678544fda3139161eacd23856beb6298e7cd29
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
trusty-cms (4.1.
|
4
|
+
trusty-cms (4.1.4)
|
5
5
|
RedCloth (= 4.3.2)
|
6
6
|
acts_as_list (>= 0.9.5, < 1.1.0)
|
7
7
|
acts_as_tree (>= 2.6.1, < 2.9.0)
|
@@ -16,7 +16,7 @@ PATH
|
|
16
16
|
mini_racer
|
17
17
|
mysql2
|
18
18
|
paperclip (> 5.2)
|
19
|
-
rack (
|
19
|
+
rack (>= 2.0.1, < 2.3.0)
|
20
20
|
rack-cache (~> 1.7)
|
21
21
|
radius (~> 0.7)
|
22
22
|
rails
|
@@ -168,7 +168,7 @@ GEM
|
|
168
168
|
multipart-post
|
169
169
|
launchy (2.5.0)
|
170
170
|
addressable (~> 2.7)
|
171
|
-
libv8 (7.3.492.27.1
|
171
|
+
libv8 (7.3.492.27.1)
|
172
172
|
loofah (2.5.0)
|
173
173
|
crass (~> 1.0.2)
|
174
174
|
nokogiri (>= 1.5.9)
|
@@ -210,7 +210,7 @@ GEM
|
|
210
210
|
byebug (~> 11.0)
|
211
211
|
pry (~> 0.13.0)
|
212
212
|
public_suffix (4.0.5)
|
213
|
-
rack (2.
|
213
|
+
rack (2.2.3)
|
214
214
|
rack-cache (1.12.0)
|
215
215
|
rack (>= 0.4)
|
216
216
|
rack-test (1.1.0)
|
@@ -16,6 +16,9 @@ function RadAjaxForm(form) {
|
|
16
16
|
type: "POST",
|
17
17
|
url: form.find('input[name=submit_url]').attr('value'),
|
18
18
|
data: form.serialize(),
|
19
|
+
beforeSend: function ( xhr ) {
|
20
|
+
xhr.setRequestHeader("X-CSRF-Token", $('meta[name=csrf-token]').attr('content'));
|
21
|
+
},
|
19
22
|
success: function(data, status, xhr) {
|
20
23
|
form.find(".loader").removeClass('ajax-loader');
|
21
24
|
form.find(".loader-small").removeClass('ajax-loader-small');
|
@@ -63,17 +63,12 @@ $(document).ready(function() {
|
|
63
63
|
$('#rs-from_name').val('');
|
64
64
|
$('#rs-to').val('');
|
65
65
|
$('#rs-message').val($('#rs-base-message').val());
|
66
|
-
var captcha = new Captcha("#recaptcha-container");
|
67
|
-
captcha.reload();
|
68
66
|
}
|
69
67
|
|
70
|
-
function processFailure(xhr)
|
71
|
-
{
|
72
|
-
var captcha = new Captcha("#recaptcha-container");
|
68
|
+
function processFailure(xhr) {
|
73
69
|
var error_msg = xhr.getResponseHeader("ErrorMsg");
|
74
70
|
displayErrorMessage(error_msg);
|
75
|
-
|
76
|
-
}
|
71
|
+
}
|
77
72
|
|
78
73
|
function displayErrorMessage(msg) {
|
79
74
|
var error_msg_div = $('.rad-email-error');
|
@@ -12,13 +12,6 @@ class SocialMailerController < ApplicationController
|
|
12
12
|
message: params[:message],
|
13
13
|
subject: params[:subject],
|
14
14
|
}
|
15
|
-
|
16
|
-
if verify_recaptcha(action: 'emailSeats')
|
17
|
-
RadSocialMailer.social_mail(mailer_options).deliver_now
|
18
|
-
head :ok
|
19
|
-
else
|
20
|
-
head :bad_request, ErrorMsg: 'We have detected suspicious activity and have disabled this feature for your user.'
|
21
|
-
end
|
22
15
|
end
|
23
16
|
|
24
17
|
def social_mail_form
|
@@ -1,6 +1,6 @@
|
|
1
1
|
= stylesheet_link_tag('rad_social/rad_screen')
|
2
|
-
= javascript_include_tag('https://www.google.com/recaptcha/api/js/recaptcha_ajax.js')
|
3
2
|
= javascript_include_tag('rad_social/rad_email')
|
3
|
+
= csrf_meta_tags
|
4
4
|
|
5
5
|
.rad-dialog-titlebar
|
6
6
|
%span.rad-dialog-title
|
@@ -31,8 +31,6 @@
|
|
31
31
|
= email_message
|
32
32
|
%input{:type=>'hidden', :name=>'subject', :value=> email_subject}
|
33
33
|
%input{:type=>'hidden', :id=>'rs-base-message', :value=> email_message}
|
34
|
-
#recaptcha-container.captcha-container
|
35
|
-
= recaptcha_v3 action: 'emailSeats'
|
36
34
|
%input{:type=>'hidden', :name=>'submit_url', :value=> email_action_url}
|
37
35
|
%input.button.primary-button{:id => 'rad_email_submit', :type=>:button ,:value=>'Submit'}
|
38
36
|
.loader
|
@@ -1,5 +1,3 @@
|
|
1
|
-
- javascript('rad_social/captcha')
|
2
|
-
|
3
1
|
= form_tag
|
4
2
|
%form{:id=>'rad_social_email_form', :class=>'rad-email-form'}
|
5
3
|
%label{:for => 'from'}
|
@@ -20,6 +18,3 @@
|
|
20
18
|
%input{:type=>'hidden', :name=>'submit_url', :value=>'contact/email'}
|
21
19
|
%input.button.primary-button{:id => 'email_submit', :type=>:button ,:value=>'Submit'}
|
22
20
|
.loader
|
23
|
-
|
24
|
-
#recaptcha-container.captcha-container
|
25
|
-
= recaptcha_v3 action: 'emailSeats'
|
data/lib/trusty_cms.rb
CHANGED
data/lib/trusty_cms/engine.rb
CHANGED
data/trusty_cms.gemspec
CHANGED
@@ -36,7 +36,7 @@ a general purpose content managment system--not merely a blogging engine.'
|
|
36
36
|
s.add_dependency 'mini_racer'
|
37
37
|
s.add_dependency 'mysql2'
|
38
38
|
s.add_dependency 'paperclip', '> 5.2'
|
39
|
-
s.add_dependency 'rack', '
|
39
|
+
s.add_dependency 'rack', '>= 2.0.1', '< 2.3.0'
|
40
40
|
s.add_dependency 'rack-cache', '~> 1.7'
|
41
41
|
s.add_dependency 'radius', '~> 0.7'
|
42
42
|
s.add_dependency 'rails'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trusty-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TrustyCms CMS dev team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acts_as_list
|
@@ -226,16 +226,22 @@ dependencies:
|
|
226
226
|
name: rack
|
227
227
|
requirement: !ruby/object:Gem::Requirement
|
228
228
|
requirements:
|
229
|
-
- - "
|
229
|
+
- - ">="
|
230
230
|
- !ruby/object:Gem::Version
|
231
231
|
version: 2.0.1
|
232
|
+
- - "<"
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
version: 2.3.0
|
232
235
|
type: :runtime
|
233
236
|
prerelease: false
|
234
237
|
version_requirements: !ruby/object:Gem::Requirement
|
235
238
|
requirements:
|
236
|
-
- - "
|
239
|
+
- - ">="
|
237
240
|
- !ruby/object:Gem::Version
|
238
241
|
version: 2.0.1
|
242
|
+
- - "<"
|
243
|
+
- !ruby/object:Gem::Version
|
244
|
+
version: 2.3.0
|
239
245
|
- !ruby/object:Gem::Dependency
|
240
246
|
name: rack-cache
|
241
247
|
requirement: !ruby/object:Gem::Requirement
|
@@ -600,7 +606,6 @@ files:
|
|
600
606
|
- app/assets/javascripts/admin/validations/user_validations.js
|
601
607
|
- app/assets/javascripts/ckeditor/config.js
|
602
608
|
- app/assets/javascripts/ckeditor/contents.css
|
603
|
-
- app/assets/javascripts/rad_social/captcha.js
|
604
609
|
- app/assets/javascripts/rad_social/jquery.validate.min.js
|
605
610
|
- app/assets/javascripts/rad_social/rad_ajax_form.js
|
606
611
|
- app/assets/javascripts/rad_social/rad_email.js
|
@@ -1,42 +0,0 @@
|
|
1
|
-
function Captcha(element) {
|
2
|
-
var self = this;
|
3
|
-
var challengeFieldSelector = "#recaptcha_challenge_field";
|
4
|
-
var responseFieldSelector = "#recaptcha_response_field";
|
5
|
-
|
6
|
-
self.challengeValue = function() {
|
7
|
-
return $(element).find(challengeFieldSelector).val();
|
8
|
-
};
|
9
|
-
|
10
|
-
self.responseValue = function() {
|
11
|
-
return $(element).find(responseFieldSelector).val();
|
12
|
-
};
|
13
|
-
|
14
|
-
self.visible = function() {
|
15
|
-
return ($(element).find("#recaptcha_area").length > 0);
|
16
|
-
};
|
17
|
-
|
18
|
-
self.requestData = function() {
|
19
|
-
requestHash = {};
|
20
|
-
if(this.visible()) {
|
21
|
-
$.extend(requestHash, {
|
22
|
-
'recaptcha_challenge_field': this.challengeValue(),
|
23
|
-
'recaptcha_response_field': this.responseValue()
|
24
|
-
});
|
25
|
-
}
|
26
|
-
return requestHash;
|
27
|
-
};
|
28
|
-
|
29
|
-
self.isValid = function() {
|
30
|
-
if(this.visible()) {
|
31
|
-
return this.responseValue().length > 0;
|
32
|
-
}
|
33
|
-
return true;
|
34
|
-
};
|
35
|
-
|
36
|
-
self.reload = function() {
|
37
|
-
if(Recaptcha) {
|
38
|
-
Recaptcha.reload();
|
39
|
-
}
|
40
|
-
};
|
41
|
-
|
42
|
-
}
|