LiveChat – WP live chat plugin for WordPress - Version 3.7.3

Version Description

Download this release

Release Info

Developer livechat
Plugin Icon 128x128 LiveChat – WP live chat plugin for WordPress
Version 3.7.3
Comparing to
See all releases

Code changes from version 3.7.2 to 3.7.3

livechat.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
  Plugin Name: LiveChat
4
- Plugin URI: http://www.livechatinc.com/addons/wordpress/
5
  Description: Live chat software for live help, online sales and customer support. This plugin allows to quickly install LiveChat on any WordPress website.
6
  Author: LiveChat
7
- Author URI: http://www.livechatinc.com
8
- Version: 3.7.2
9
  Text Domain: wp-live-chat-software-for-wordpress
10
  Domain Path: /languages
11
  */
1
  <?php
2
  /*
3
  Plugin Name: LiveChat
4
+ Plugin URI: https://www.livechatinc.com/addons/wordpress/
5
  Description: Live chat software for live help, online sales and customer support. This plugin allows to quickly install LiveChat on any WordPress website.
6
  Author: LiveChat
7
+ Author URI: https://www.livechatinc.com
8
+ Version: 3.7.3
9
  Text Domain: wp-live-chat-software-for-wordpress
10
  Domain Path: /languages
11
  */
plugin_files/LiveChatAdmin.class.php CHANGED
@@ -41,46 +41,53 @@ final class LiveChatAdmin extends LiveChat
41
  {
42
  parent::__construct();
43
 
44
- add_action('init', array($this, 'load_translations'));
45
- add_action('init', array($this, 'load_menu_icon_styles'));
46
 
47
  // notice action
48
- if($this->check_review_notice_conditions()) {
49
- add_action('init', array($this, 'load_review_scripts'));
50
- add_action('wp_ajax_lc_review_dismiss', array($this, 'ajax_review_dismiss'));
51
- add_action('wp_ajax_lc_review_postpone', array($this, 'ajax_review_postpone'));
52
- add_action('admin_notices', array($this, 'show_review_notice'));
53
  }
54
 
55
- if(!$this->is_installed() && !(array_key_exists('page', $_GET) && $_GET['page'] === 'livechat_settings')) {
56
- add_action('admin_notices', array($this, 'show_connect_notice'));
57
- }
58
 
59
- add_action('init', array($this, 'load_scripts'));
60
 
61
- add_action('admin_menu', array($this, 'admin_menu'));
62
 
63
  // tricky error reporting
64
- if (defined('WP_DEBUG') && WP_DEBUG == true)
65
- {
66
- add_action('init', array($this, 'error_reporting'));
67
  }
68
 
69
- if (array_key_exists('reset', $_GET) && $_GET['reset'] == '1' && $_GET['page'] === 'livechat_settings')
70
- {
71
- $this->reset_options();
72
- }
73
- else if ((
74
- array_key_exists('REQUEST_METHOD', $_SERVER) &&
75
- $_SERVER['REQUEST_METHOD'] === 'POST' &&
76
- array_key_exists('HTTP_REFERER', $_SERVER) &&
77
- strpos($_SERVER['HTTP_REFERER'], 'livechat_settings') !== false
78
- ) || (
79
- !array_key_exists('HTTP_REFERER', $_SERVER) &&
80
- array_key_exists('REQUEST_METHOD', $_SERVER) &&
81
- $_SERVER['REQUEST_METHOD'] === 'POST'
82
- )) {
83
- echo $this->update_options($_POST);
 
 
 
 
 
 
 
 
84
  }
85
  }
86
 
@@ -371,7 +378,7 @@ final class LiveChatAdmin extends LiveChat
371
  $email = isset($data['licenseEmail']) ? (string) $data['licenseEmail'] : '';
372
 
373
  update_option('livechat_license_number', $license_number);
374
- update_option('livechat_email', $email);
375
 
376
  update_option('livechat_review_notice_start_timestamp', time());
377
  update_option('livechat_review_notice_start_timestamp_offset', 45);
41
  {
42
  parent::__construct();
43
 
44
+ add_action( 'init', array( $this, 'load_translations' ) );
45
+ add_action( 'init', array( $this, 'load_menu_icon_styles' ) );
46
 
47
  // notice action
48
+ if ( $this->check_review_notice_conditions() ) {
49
+ add_action( 'init', array( $this, 'load_review_scripts' ) );
50
+ add_action( 'wp_ajax_lc_review_dismiss', array( $this, 'ajax_review_dismiss' ) );
51
+ add_action( 'wp_ajax_lc_review_postpone', array( $this, 'ajax_review_postpone' ) );
52
+ add_action( 'admin_notices', array( $this, 'show_review_notice' ) );
53
  }
54
 
55
+ if ( ! $this->is_installed() && ! ( array_key_exists( 'page', $_GET ) && $_GET['page'] === 'livechat_settings' ) ) {
56
+ add_action( 'admin_notices', array( $this, 'show_connect_notice' ) );
57
+ }
58
 
59
+ add_action( 'init', array( $this, 'load_scripts' ) );
60
 
61
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
62
 
63
  // tricky error reporting
64
+ if ( defined( 'WP_DEBUG' ) && WP_DEBUG == true ) {
65
+ add_action( 'init', array( $this, 'error_reporting' ) );
 
66
  }
67
 
68
+ add_action( 'init', array( $this, 'handle_post' ) );
69
+ }
70
+
71
+ public function handle_post() {
72
+ if (
73
+ is_admin() &&
74
+ array_key_exists('nonce', $_GET) &&
75
+ wp_verify_nonce($_GET['nonce'], 'livechat-security-check')
76
+ ) {
77
+ if ( array_key_exists( 'reset', $_GET ) && $_GET['reset'] == '1' && $_GET['page'] === 'livechat_settings' ) {
78
+ $this->reset_options();
79
+ } else if ( (
80
+ array_key_exists( 'REQUEST_METHOD', $_SERVER ) &&
81
+ $_SERVER['REQUEST_METHOD'] === 'POST' &&
82
+ array_key_exists( 'HTTP_REFERER', $_SERVER ) &&
83
+ strpos( $_SERVER['HTTP_REFERER'], 'livechat_settings' ) !== false
84
+ ) || (
85
+ ! array_key_exists( 'HTTP_REFERER', $_SERVER ) &&
86
+ array_key_exists( 'REQUEST_METHOD', $_SERVER ) &&
87
+ $_SERVER['REQUEST_METHOD'] === 'POST'
88
+ ) ) {
89
+ echo $this->update_options( $_POST );
90
+ }
91
  }
92
  }
93
 
378
  $email = isset($data['licenseEmail']) ? (string) $data['licenseEmail'] : '';
379
 
380
  update_option('livechat_license_number', $license_number);
381
+ update_option('livechat_email', sanitize_email($email));
382
 
383
  update_option('livechat_review_notice_start_timestamp', time());
384
  update_option('livechat_review_notice_start_timestamp_offset', 45);
plugin_files/helpers/SettingsHelper.class.php CHANGED
@@ -4,6 +4,10 @@ require_once('LiveChatHelper.class.php');
4
 
5
  class SettingsHelper extends LiveChatHelper
6
  {
 
 
 
 
7
  public function render()
8
  {
9
 
@@ -30,7 +34,7 @@ class SettingsHelper extends LiveChatHelper
30
  <p class="login-with-livechat"><br>
31
  <iframe id="login-with-livechat" src="https://addons.livechatinc.com/sign-in-with-livechat/wordpress/?linkLabel=Connect+with+LiveChat&popupRoute=signup%2Fcredentials&a=wordpress&utm_source=wordpress.org&utm_medium=integration&utm_campaign=wordpress_plugin&email=<?php echo urlencode($user['email']); ?>&name=<?php echo urlencode($user['name']); ?>" > </iframe>
32
  </p>
33
- <form id="licenseForm" action="?page=livechat_settings&actionType=install" method="post">
34
  <input type="hidden" name="licenseEmail" id="licenseEmail">
35
  <input type="hidden" name="licenseNumber" id="licenseNumber">
36
  </form>
@@ -80,14 +84,15 @@ class SettingsHelper extends LiveChatHelper
80
  </div>
81
  </div>
82
  <p class="disconenct">
83
- <?php _e('Something went wrong?', 'wp-live-chat-software-for-wordpress'); ?> <a id="resetAccount" href="?page=livechat_settings&reset=1" style="display: inline-block">
84
  <?php _e('Disconect your account.', 'wp-live-chat-software-for-wordpress'); ?>
85
  </a>
86
  </p>
87
  <script>
88
  var lcDetails = {
89
- license: <?php echo $license_id ?>,
90
- email: '<?php echo $license_email ?>'
 
91
  }
92
  </script>
93
  </div>
4
 
5
  class SettingsHelper extends LiveChatHelper
6
  {
7
+ public function add_nonce() {
8
+ echo '&nonce=' . wp_create_nonce('livechat-security-check');
9
+ }
10
+
11
  public function render()
12
  {
13
 
34
  <p class="login-with-livechat"><br>
35
  <iframe id="login-with-livechat" src="https://addons.livechatinc.com/sign-in-with-livechat/wordpress/?linkLabel=Connect+with+LiveChat&popupRoute=signup%2Fcredentials&a=wordpress&utm_source=wordpress.org&utm_medium=integration&utm_campaign=wordpress_plugin&email=<?php echo urlencode($user['email']); ?>&name=<?php echo urlencode($user['name']); ?>" > </iframe>
36
  </p>
37
+ <form id="licenseForm" action="?page=livechat_settings&actionType=install<?php $this->add_nonce(); ?>" method="post">
38
  <input type="hidden" name="licenseEmail" id="licenseEmail">
39
  <input type="hidden" name="licenseNumber" id="licenseNumber">
40
  </form>
84
  </div>
85
  </div>
86
  <p class="disconenct">
87
+ <?php _e('Something went wrong?', 'wp-live-chat-software-for-wordpress'); ?> <a id="resetAccount" href="?page=livechat_settings&reset=1<?php $this->add_nonce(); ?>" style="display: inline-block">
88
  <?php _e('Disconect your account.', 'wp-live-chat-software-for-wordpress'); ?>
89
  </a>
90
  </p>
91
  <script>
92
  var lcDetails = {
93
+ license: <?php echo htmlspecialchars($license_id); ?>,
94
+ email: '<?php echo htmlspecialchars($license_email); ?>',
95
+ nonce: '<?php $this->add_nonce(); ?>'
96
  }
97
  </script>
98
  </div>
plugin_files/js/livechat.js CHANGED
@@ -113,7 +113,7 @@ var LiveChat =
113
 
114
  setSettings: function(settings) {
115
  $.ajax({
116
- url: '?page=livechat_settings',
117
  type: "POST",
118
  data: settings,
119
  dataType: 'json',
113
 
114
  setSettings: function(settings) {
115
  $.ajax({
116
+ url: '?page=livechat_settingslcDetails' + lcDetails.nonce,
117
  type: "POST",
118
  data: settings,
119
  dataType: 'json',
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === LiveChat - WP live chat plugin for WordPress ===
2
  Contributors: LiveChat
3
  Tags: chat plugin, live chat, live chat plugin, wordpress live chat, wordpress chat, wordpress live chat plugin, wordpress chat plugin, live chat software, live support, help desk, help desk software, online ticketing system, ticketing system, online support, ecommerce chat, chat online, chat software, sales, customer help, customer support, livechat, customer service software, chat, customer service chat, live chat button, live chat support, live chat tool, live chat widget, live support button, live chat solution, online live chat, online chat, wp chat, wp live chat, livechat inc, livechatinc, live chat inc, wp livechat support, smartsupp, smart supp, tidio, jivochat, formilla, tawk, tawkto, tawk.to, facebook, facebook messenger, messenger, facebook live chat, facebook chat, crisp, pure chat, purechat, zendesk, zendesk chat, liveagent, olark, happyfox, reve chat, chatra, provide support, comm100, kayako, zoho, zoho salesiq, userlike, userengage, drift, livehelpnow, live help now, intercom, freshdesk, zendesk, clickdesk, liveperson, live person, bold360, websitealive, website alive, velaro, hubspot, salesforce, zapier, zopim, mailchimp, analytics, google analytics, im chat, slack, casengo, tagove, wisechat, wise chat, mylivechat, my live chat, livezilla, chatrify
4
- Stable tag: 3.7.2
5
  Requires PHP: 5.6
6
- Tested up to: 5.1
7
  Requires at least: 3.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -16,7 +16,7 @@ LiveChat – WP live chat plugin for WordPress is a WordPress specific chat plug
16
 
17
  With a fully functional WordPress chat plugin, not only **you can increase your sales** - as it’s the quickest way to remove buyer objections – but it also allows you to **build stronger customer relationships**.
18
 
19
- https://www.youtube.com/watch?v=kZVYwNcuj38
20
 
21
  LiveChat's live chat app comes with a comprehensive set of features, including proactive chat invitations – so chat operators can automatically send personalized messages to appear based on specified conditions, such as the number of visited pages or time spent on the website.
22
 
@@ -42,6 +42,8 @@ From email marketing to social, **LiveChat integrates seamlessly with a range of
42
 
43
  If you run a website, and you are serious about your business then using live chat is no brainer. Live chat plugin for WordPress adds a live chat widget to the bottom of your website that allows visitors to chat to you in real time. Live chat software is perfect for businesses of all sizes, enabling them to close more sales and improve customer satisfaction scores.
44
 
 
 
45
  = Usage =
46
 
47
  With the LiveChat online chat plugin for WordPress, you can add a live chat box to every page of your website, including the checkout in no time. To answer chats, chat operators have to be logged into one of our chat apps - [LiveChat for web browser](https://www.livechatinc.com/applications/livechat-web-app/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration), [LiveChat for macOS](https://www.livechatinc.com/applications/livechat-for-mac/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration) or [LiveChat for Windows](https://www.livechatinc.com/applications/livechat-for-windows/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration). There are also applications for mobile devices - [iPhone](https://www.livechatinc.com/applications/livechat-for-iphone/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration), [iPad](https://www.livechatinc.com/applications/livechat-for-ipad/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration) and [Android](https://www.livechatinc.com/applications/livechat-for-android/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration).
@@ -74,7 +76,7 @@ While LiveChat'S chat plugin for WordPress is free, you need a subscription of L
74
 
75
  - **Mobile live chat applications** - mobile apps for iOS and Android will help you chat with customers wherever you are.
76
 
77
- https://www.youtube.com/watch?v=2jk8pzvBdag
78
 
79
  With this chat plugin, there are many other features that can help you **close more sales** and **satisfy more customers**; you can see all of them [here](https://www.livechatinc.com/features/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration).
80
 
@@ -152,6 +154,8 @@ Michal Haze, the Head of Customer Experience at Kinguin
152
  * For more information about live chat features, FAQs and documentation, check out our [website](https://www.livechatinc.com/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration).
153
  * If interested, you can join our community group [here](https://www.livechatinc.com/community/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration).
154
 
 
 
155
  == About us ==
156
 
157
  LiveChat is a provider of cloud-based customers service platform with live support, ticketing system and web analytics capabilities. The main aim of LiveChat is to improve customer service and increase sales conversion. The software is used by more than 25,000 businesses including top names like Ikea and PayPal.
@@ -160,7 +164,9 @@ LiveChat is a provider of cloud-based customers service platform with live suppo
160
 
161
  LiveChat’s ecosystem of products includes:
162
  - **[LiveChat](https://www.livechatinc.com/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration)** - a communication tool that allows you to chat live with your customers.
 
163
  - **[ChatBot](https://www.chatbot.com/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration)** - a bot framework for AI chat bots.
 
164
  - **[Knowledge Base](https://www.knowledgebase.ai/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration)** - software that helps your LiveChat agents and website visitors at the same time. It consists of the Internal Widget and the public Help Center.
165
 
166
  == Frequently Asked Questions ==
@@ -307,6 +313,9 @@ For more detailed instructions, go to the [live chat plugin page](https://www.li
307
 
308
  == Changelog ==
309
 
 
 
 
310
  = 3.7.2 =
311
  * fix for undefined HTTP_USER_AGENT
312
 
1
  === LiveChat - WP live chat plugin for WordPress ===
2
  Contributors: LiveChat
3
  Tags: chat plugin, live chat, live chat plugin, wordpress live chat, wordpress chat, wordpress live chat plugin, wordpress chat plugin, live chat software, live support, help desk, help desk software, online ticketing system, ticketing system, online support, ecommerce chat, chat online, chat software, sales, customer help, customer support, livechat, customer service software, chat, customer service chat, live chat button, live chat support, live chat tool, live chat widget, live support button, live chat solution, online live chat, online chat, wp chat, wp live chat, livechat inc, livechatinc, live chat inc, wp livechat support, smartsupp, smart supp, tidio, jivochat, formilla, tawk, tawkto, tawk.to, facebook, facebook messenger, messenger, facebook live chat, facebook chat, crisp, pure chat, purechat, zendesk, zendesk chat, liveagent, olark, happyfox, reve chat, chatra, provide support, comm100, kayako, zoho, zoho salesiq, userlike, userengage, drift, livehelpnow, live help now, intercom, freshdesk, zendesk, clickdesk, liveperson, live person, bold360, websitealive, website alive, velaro, hubspot, salesforce, zapier, zopim, mailchimp, analytics, google analytics, im chat, slack, casengo, tagove, wisechat, wise chat, mylivechat, my live chat, livezilla, chatrify
4
+ Stable tag: 3.7.3
5
  Requires PHP: 5.6
6
+ Tested up to: 5.2
7
  Requires at least: 3.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
16
 
17
  With a fully functional WordPress chat plugin, not only **you can increase your sales** - as it’s the quickest way to remove buyer objections – but it also allows you to **build stronger customer relationships**.
18
 
19
+ https://www.youtube.com/watch?v=dKUdE-JKhZI
20
 
21
  LiveChat's live chat app comes with a comprehensive set of features, including proactive chat invitations – so chat operators can automatically send personalized messages to appear based on specified conditions, such as the number of visited pages or time spent on the website.
22
 
42
 
43
  If you run a website, and you are serious about your business then using live chat is no brainer. Live chat plugin for WordPress adds a live chat widget to the bottom of your website that allows visitors to chat to you in real time. Live chat software is perfect for businesses of all sizes, enabling them to close more sales and improve customer satisfaction scores.
44
 
45
+ https://www.youtube.com/watch?v=kZVYwNcuj38
46
+
47
  = Usage =
48
 
49
  With the LiveChat online chat plugin for WordPress, you can add a live chat box to every page of your website, including the checkout in no time. To answer chats, chat operators have to be logged into one of our chat apps - [LiveChat for web browser](https://www.livechatinc.com/applications/livechat-web-app/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration), [LiveChat for macOS](https://www.livechatinc.com/applications/livechat-for-mac/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration) or [LiveChat for Windows](https://www.livechatinc.com/applications/livechat-for-windows/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration). There are also applications for mobile devices - [iPhone](https://www.livechatinc.com/applications/livechat-for-iphone/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration), [iPad](https://www.livechatinc.com/applications/livechat-for-ipad/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration) and [Android](https://www.livechatinc.com/applications/livechat-for-android/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration).
76
 
77
  - **Mobile live chat applications** - mobile apps for iOS and Android will help you chat with customers wherever you are.
78
 
79
+ https://www.youtube.com/watch?v=w-tO_H5qCTk
80
 
81
  With this chat plugin, there are many other features that can help you **close more sales** and **satisfy more customers**; you can see all of them [here](https://www.livechatinc.com/features/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration).
82
 
154
  * For more information about live chat features, FAQs and documentation, check out our [website](https://www.livechatinc.com/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration).
155
  * If interested, you can join our community group [here](https://www.livechatinc.com/community/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration).
156
 
157
+ https://www.youtube.com/watch?v=fOPeF1AoPiM
158
+
159
  == About us ==
160
 
161
  LiveChat is a provider of cloud-based customers service platform with live support, ticketing system and web analytics capabilities. The main aim of LiveChat is to improve customer service and increase sales conversion. The software is used by more than 25,000 businesses including top names like Ikea and PayPal.
164
 
165
  LiveChat’s ecosystem of products includes:
166
  - **[LiveChat](https://www.livechatinc.com/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration)** - a communication tool that allows you to chat live with your customers.
167
+ - **[HelpDesk](https://www.helpdesk.com/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration)** - an online ticketing system suitable both for small businesses and enterprise clients.
168
  - **[ChatBot](https://www.chatbot.com/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration)** - a bot framework for AI chat bots.
169
+ - **[Open Messaging Platform](https://www.livechatinc.com/platform//?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration)** - create and monetize apps or build extensions for your own team.
170
  - **[Knowledge Base](https://www.knowledgebase.ai/?utm_source=wordpress.org&utm_medium=integration&utm_campaign=WordpressIntegration)** - software that helps your LiveChat agents and website visitors at the same time. It consists of the Internal Widget and the public Help Center.
171
 
172
  == Frequently Asked Questions ==
313
 
314
  == Changelog ==
315
 
316
+ = 3.7.2 =
317
+ * security fixes, thanks to [guyz from pluginvulnerabilities.com](https://www.pluginvulnerabilities.com/2019/06/19/wordpress-plugins-are-so-insecure-you-can-claim-the-wrong-plugin-is-insecure-and-still-be-right/)
318
+
319
  = 3.7.2 =
320
  * fix for undefined HTTP_USER_AGENT
321