Better Click To Tweet - Version 5.10.4

Version Description

  • security prevent unauthenticated access some settings.
Download this release

Release Info

Developer ben.meredith@gmail.com
Plugin Icon 128x128 Better Click To Tweet
Version 5.10.4
Comparing to
See all releases

Code changes from version 5.10.3 to 5.10.4

bctt-welcome.php CHANGED
@@ -7,7 +7,7 @@
7
  * @since 5.7.0
8
  *
9
  */
10
- if ( ! defined( 'ABSPATH' ) ) {
11
  exit;
12
  }
13
 
@@ -28,11 +28,17 @@ if ( ! class_exists( 'BCTT_Welcome' ) ):
28
  add_dashboard_page( '', '', 'manage_options', 'bctt-welcome', '' );
29
  }
30
 
 
31
  public function welcome_page() {
 
 
 
 
32
  set_current_screen();
33
 
34
  // Update twitter handle
35
- if ( isset( $_POST['bctt-twitter'] ) ) {
 
36
  update_option( 'bctt-twitter-handle', $_POST['bctt-twitter'] );
37
  wp_safe_redirect( bctt_get_step_url( 'bctt-usage' ) );
38
  exit;
7
  * @since 5.7.0
8
  *
9
  */
10
+ if ( ! defined( 'ABSPATH' ) && !current_user_can('manage_options') ) {
11
  exit;
12
  }
13
 
28
  add_dashboard_page( '', '', 'manage_options', 'bctt-welcome', '' );
29
  }
30
 
31
+
32
  public function welcome_page() {
33
+ if( !current_user_can('manage_options')){
34
+ exit;
35
+ }
36
+
37
  set_current_screen();
38
 
39
  // Update twitter handle
40
+ if ( isset( $_POST['bctt-twitter']) && current_user_can('manage_options')
41
+ && wp_verify_nonce( $_POST['save-the-handle'], 'change-handle' ) ) {
42
  update_option( 'bctt-twitter-handle', $_POST['bctt-twitter'] );
43
  wp_safe_redirect( bctt_get_step_url( 'bctt-usage' ) );
44
  exit;
better-click-to-tweet.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Better Click To Tweet
4
  * Description: Add Click to Tweet boxes simply and elegantly to your posts or pages. All the features of a premium plugin, for FREE!
5
- * Version: 5.10.3
6
  * Author: Ben Meredith
7
  * Author URI: https://www.betterclicktotweet.com
8
  * Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
@@ -12,7 +12,7 @@
12
 
13
  defined( 'ABSPATH' ) or die( "No soup for you. You leave now." );
14
 
15
- define ( 'BCTT_VERSION', '5.10.3' );
16
 
17
  include 'i18n-module.php';
18
  include 'bctt-admin.php';
2
  /**
3
  * Plugin Name: Better Click To Tweet
4
  * Description: Add Click to Tweet boxes simply and elegantly to your posts or pages. All the features of a premium plugin, for FREE!
5
+ * Version: 5.10.4
6
  * Author: Ben Meredith
7
  * Author URI: https://www.betterclicktotweet.com
8
  * Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
12
 
13
  defined( 'ABSPATH' ) or die( "No soup for you. You leave now." );
14
 
15
+ define ( 'BCTT_VERSION', '5.10.4' );
16
 
17
  include 'i18n-module.php';
18
  include 'bctt-admin.php';
includes/views/welcome/_welcome.php CHANGED
@@ -25,7 +25,8 @@
25
  action="<?php echo esc_attr($_SERVER['REQUEST_URI']); ?>"
26
  method="post"
27
  class="text-center flex flex-col flex-no-wrap mt-8">
28
-
 
29
  <label for="bctt-twitter" class="text-blue-500 font-bold">
30
  <?php _e( 'Want a site-wide default for the "via" on the Tweet?', 'better-click-to-tweet' )?>
31
  </label>
25
  action="<?php echo esc_attr($_SERVER['REQUEST_URI']); ?>"
26
  method="post"
27
  class="text-center flex flex-col flex-no-wrap mt-8">
28
+ <?php wp_nonce_field( 'change-handle', 'save-the-handle' ); ?>
29
+
30
  <label for="bctt-twitter" class="text-blue-500 font-bold">
31
  <?php _e( 'Want a site-wide default for the "via" on the Tweet?', 'better-click-to-tweet' )?>
32
  </label>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.wpsteward.com/donations/plugin-support/
4
  Tags: click to tweet, twitter, tweet,
5
  Requires at least: 3.8
6
  Tested up to: 6.1
7
- Stable tag: 5.10.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -96,6 +96,8 @@ Donations: http://benlikes.us/donate
96
  1. Becomes this in your blog post!
97
 
98
  == Changelog ==
 
 
99
 
100
  = 5.10.3 =
101
  * updated compatibility for PHP 8.0 and 8.1
4
  Tags: click to tweet, twitter, tweet,
5
  Requires at least: 3.8
6
  Tested up to: 6.1
7
+ Stable tag: 5.10.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
96
  1. Becomes this in your blog post!
97
 
98
  == Changelog ==
99
+ = 5.10.4 =
100
+ * security — prevent unauthenticated access some settings.
101
 
102
  = 5.10.3 =
103
  * updated compatibility for PHP 8.0 and 8.1