Skip to content

Commit ea7fa36

Browse files
committed
release: version updated and added changelog
1 parent bd23382 commit ea7fa36

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

build/qubely/core/QUBELY.php

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,13 +1171,29 @@ public function get_saved_preset($request)
11711171

11721172
public function qubely_get_content($request)
11731173
{
1174+
11741175
$params = $request->get_params();
1176+
$post_id = sanitize_text_field( wp_unslash( $params['postId'] ?? 0 ) );
1177+
11751178
try {
1176-
if (isset($params['postId'])) {
1179+
if ( $post_id ) {
1180+
if ( current_user_can( 'edit_post', $post_id ) ) {
1181+
return [
1182+
'success' => true,
1183+
'data' => get_post( $post_id )->post_content,
1184+
'message' => 'Get Data Success!!',
1185+
];
1186+
} else {
1187+
return [
1188+
'success' => false,
1189+
'message' => 'You are not allowed to edit this post',
1190+
];
1191+
}
1192+
1193+
} else {
11771194
return [
1178-
'success' => true,
1179-
'data' => !empty($params['postId']) ? get_post($params['postId'])->post_content : '',
1180-
'message' => 'Get Data Success!!',
1195+
'success' => false,
1196+
'message' => 'Post ID is required',
11811197
];
11821198
}
11831199
} catch (Exception $e) {

build/qubely/qubely.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Qubely - Advanced Gutenberg Blocks
44
* Plugin URI: https://www.themeum.com/
55
* Description: The one and only Gutenberg block plugin you will ever need.
6-
* Version: 1.8.13
6+
* Version: 1.8.14
77
* Author: Themeum
88
* Author URI: https://www.themeum.com/
99
* Text Domain: qubely
@@ -24,7 +24,7 @@ function qubely_language_load()
2424
}
2525

2626
// Define Version
27-
define('QUBELY_VERSION', '1.8.13');
27+
define('QUBELY_VERSION', '1.8.14');
2828

2929
// Define License
3030
define('QUBELY_LICENSE', 'free');

build/qubely/readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://www.themeum.com
44
Tags: blocks, gutenberg, gutenberg blocks, editor, block, page builder
55
Requires at least: 5.3
66
Tested up to: 6.7
7-
Stable tag: 1.8.13
7+
Stable tag: 1.8.14
88
Requires PHP: 7.0
99
License: GPL-2.0+
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@@ -230,6 +230,9 @@ You can report bugs on the [support forum here](https://wordpress.org/support/pl
230230

231231
== Changelog ==
232232

233+
= 1.8.14 =
234+
Update: Security update to protect `qubely_get_content` from unauthorized access to sensitive post data.
235+
233236
= 1.8.13 =
234237
Update: Security Update(Prevent Cross-Site Scripting)
235238

0 commit comments

Comments
 (0)