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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ec4507891ffcef07709998473113f66f350d6c17ac1a1a40ca8593d6b565855
4
- data.tar.gz: 994dec6d305e0ce812c7311ef3ff4c15f5a439f61d09a21bcafdf235d6a4f08d
3
+ metadata.gz: '06485f3b9ed1c9ca511e064801b64e301c62a152a1da3ad7902215ab146f6c0d'
4
+ data.tar.gz: f2c25843032b941ffb0f1b7cb8920b07298ab131f626b2bd4cab6aee580a61e4
5
5
  SHA512:
6
- metadata.gz: 642b211413fead95b9f8a33eeead86c404f9f6debc150c3440416f380534be866ea9c817a312a5e65610a3df06ba8f7d0397a74429be26e2afeae0dd9de5e6b1
7
- data.tar.gz: 12cc8927f097db47b3b97c38fd66f708fb5ac81ae4e12e5f43a0a07ae011184d82eef46adaa0d7e3b6f49a1f2dc2b585bb9dc19f0551bf83023219743a429d4c
6
+ metadata.gz: f3660bb986c773d9e81821660898e04af9c985297acfd8bc2a57c4623f931b9636dc4f628176e370a46d3676608f9778b476ff9a21e1d775587c2739755f6873
7
+ data.tar.gz: 23246702302f14f37569aa164467d76f771df08a562a1f7c2dc773a85308ab2abcfd81e7343f68bf4f4cab92c2678544fda3139161eacd23856beb6298e7cd29
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (4.1.3)
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 (~> 2.0.1)
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-x86_64-linux)
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.0.9)
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');
@@ -1,6 +1,5 @@
1
1
  //= require jquery
2
2
  //= require 'rad_social/jquery.validate.min'
3
3
  //= require 'rad_social/rad_ajax_form'
4
- //= require 'rad_social/captcha'
5
4
  //= require 'rad_social/rad_email_validator'
6
5
  //= require 'rad_social/rad_email_form'
@@ -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
- captcha.reload();
76
- }
71
+ }
77
72
 
78
73
  function displayErrorMessage(msg) {
79
74
  var error_msg_div = $('.rad-email-error');
@@ -55,10 +55,6 @@
55
55
  float: right;
56
56
  }
57
57
 
58
- .rad-email-form .captcha-container {
59
- padding: 10px 0px;
60
- }
61
-
62
58
  .rad-email-form input.std_input {
63
59
  margin-bottom: 10px;
64
60
  }
@@ -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'
@@ -2,6 +2,6 @@ TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) unle
2
2
 
3
3
  unless defined? TrustyCms::VERSION
4
4
  module TrustyCms
5
- VERSION = '4.1.3'.freeze
5
+ VERSION = '4.1.4'.freeze
6
6
  end
7
7
  end
@@ -12,7 +12,6 @@ module TrustyCms
12
12
  ckeditor/skins/moono/editor.css
13
13
  ckeditor/lang/en.js
14
14
  rad_social/rad_screen.css
15
- rad_social/captcha.js
16
15
  rad_social/rad_email.js
17
16
  rad_social/rad_widget.js
18
17
  )
@@ -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', '~> 2.0.1'
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.3
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-12 00:00:00.000000000 Z
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
- }