Version Description
- Security Bug fixing - Using nonce in deleting redirects
Download this release
Release Info
Developer | osamaesh |
Plugin | SEO Redirection Plugin |
Version | 7.9 |
Comparing to | |
See all releases |
Code changes from version 7.8 to 7.9
custom/controls/cf.SR_redirect_cache.class.php
CHANGED
@@ -131,9 +131,18 @@ if(!class_exists('free_SR_redirect_cache')){
|
|
131 |
/*- Delete Redirect ----------------------------------------*/
|
132 |
public function del_redirect($post_id)
|
133 |
{
|
134 |
-
|
135 |
-
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
}
|
138 |
|
139 |
/*- Free Cache ----------------------------------------*/
|
131 |
/*- Delete Redirect ----------------------------------------*/
|
132 |
public function del_redirect($post_id)
|
133 |
{
|
134 |
+
|
135 |
+
if(isset($_REQUEST['_wpnonce']))
|
136 |
+
$nonce = WPSR_sanitize_text_or_array_field($_REQUEST['_wpnonce']);
|
137 |
+
|
138 |
+
if(wp_verify_nonce( $nonce, 'seoredirection' )){
|
139 |
+
|
140 |
+
|
141 |
+
global $wpdb,$table_prefix;
|
142 |
+
$table_name = $table_prefix . 'WP_SEO_Cache';
|
143 |
+
return $wpdb->get_var("delete from $table_name where ID='$post_id'; ");
|
144 |
+
|
145 |
+
}
|
146 |
}
|
147 |
|
148 |
/*- Free Cache ----------------------------------------*/
|
custom/lib/cf.SR_redirect_cache.class.php
CHANGED
@@ -175,9 +175,15 @@ if(!class_exists('clogica_SR_redirect_cache')){
|
|
175 |
/*- Delete Redirect ----------------------------------------*/
|
176 |
public function del_redirect($post_id)
|
177 |
{
|
|
|
|
|
|
|
|
|
|
|
178 |
global $wpdb,$table_prefix;
|
179 |
$table_name = $table_prefix."WP_SEO_Cache";
|
180 |
return $wpdb->get_var("delete from $table_name where ID='$post_id'; ");
|
|
|
181 |
}
|
182 |
|
183 |
/*- Free Cache ----------------------------------------*/
|
175 |
/*- Delete Redirect ----------------------------------------*/
|
176 |
public function del_redirect($post_id)
|
177 |
{
|
178 |
+
if(isset($_REQUEST['_wpnonce']))
|
179 |
+
$nonce = WPSR_sanitize_text_or_array_field($_REQUEST['_wpnonce']);
|
180 |
+
|
181 |
+
if(wp_verify_nonce( $nonce, 'seoredirection' )){
|
182 |
+
|
183 |
global $wpdb,$table_prefix;
|
184 |
$table_name = $table_prefix."WP_SEO_Cache";
|
185 |
return $wpdb->get_var("delete from $table_name where ID='$post_id'; ");
|
186 |
+
}
|
187 |
}
|
188 |
|
189 |
/*- Free Cache ----------------------------------------*/
|
options/option_page_custome_redirection_list.php
CHANGED
@@ -228,6 +228,7 @@ isset($_REQUEST['tab']) ? $url_op = WPSR_sanitize_text_or_array_field($_REQUEST[
|
|
228 |
|
229 |
</div>
|
230 |
<form method='post'>
|
|
|
231 |
<?php
|
232 |
$grid = new datagrid();
|
233 |
|
228 |
|
229 |
</div>
|
230 |
<form method='post'>
|
231 |
+
<input type="hidden" id="_wpnonce" name="_wpnonce" value="<?php echo esc_attr(wp_create_nonce('seoredirection')); ?>" />
|
232 |
<?php
|
233 |
$grid = new datagrid();
|
234 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: wp-buy, osama.esh
|
|
3 |
Tags: post, admin, seo, pages, manage, 301, 404, soft 404, redirect, permalink, redirection, redirection, https, automatic redirection, htaccess, ssl, https redirection, ssl certificate, secure page, secure, force ssl, force https, seo redirection, post redirect, 404 to 301
|
4 |
Requires at least: 4.1
|
5 |
Tested up to: 5.8
|
6 |
-
Stable tag: 7.
|
7 |
|
8 |
SEO Redirection is a powerful redirect manager to manage 301 redirects without requiring knowledge of Apache .htaccess files.
|
9 |
|
@@ -74,6 +74,11 @@ Yes, here is the plugin full knowledge base http://www.clogica.com/kb/
|
|
74 |
== Upgrade Notice ==
|
75 |
|
76 |
|
|
|
|
|
|
|
|
|
|
|
77 |
= 7.8 =
|
78 |
* Bug fixing - CSRF issue
|
79 |
|
3 |
Tags: post, admin, seo, pages, manage, 301, 404, soft 404, redirect, permalink, redirection, redirection, https, automatic redirection, htaccess, ssl, https redirection, ssl certificate, secure page, secure, force ssl, force https, seo redirection, post redirect, 404 to 301
|
4 |
Requires at least: 4.1
|
5 |
Tested up to: 5.8
|
6 |
+
Stable tag: 7.9
|
7 |
|
8 |
SEO Redirection is a powerful redirect manager to manage 301 redirects without requiring knowledge of Apache .htaccess files.
|
9 |
|
74 |
== Upgrade Notice ==
|
75 |
|
76 |
|
77 |
+
|
78 |
+
= 7.9 =
|
79 |
+
* Security Bug fixing - Using nonce in deleting redirects
|
80 |
+
|
81 |
+
|
82 |
= 7.8 =
|
83 |
* Bug fixing - CSRF issue
|
84 |
|
seo-redirection.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: SEO Redirection
|
|
4 |
Plugin URI: https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/
|
5 |
Description: By this plugin you can manage all your website redirection types easily.
|
6 |
Author: wp-buy
|
7 |
-
Version: 7.
|
8 |
Author URI: https://www.wp-buy.com
|
9 |
Text Domain: seo-redirection
|
10 |
*/
|
@@ -1368,16 +1368,22 @@ if(!function_exists("SR_init_delete_callback")) {
|
|
1368 |
function SR_init_delete_callback()
|
1369 |
{
|
1370 |
if (isset($_POST['redirect_id']) && count($_POST['redirect_id']) > 0) {
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1381 |
}
|
1382 |
}
|
1383 |
}
|
4 |
Plugin URI: https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/
|
5 |
Description: By this plugin you can manage all your website redirection types easily.
|
6 |
Author: wp-buy
|
7 |
+
Version: 7.9
|
8 |
Author URI: https://www.wp-buy.com
|
9 |
Text Domain: seo-redirection
|
10 |
*/
|
1368 |
function SR_init_delete_callback()
|
1369 |
{
|
1370 |
if (isset($_POST['redirect_id']) && count($_POST['redirect_id']) > 0) {
|
1371 |
+
|
1372 |
+
$nonce = '';
|
1373 |
+
if(isset($_REQUEST['_wpnonce']))
|
1374 |
+
$nonce = WPSR_sanitize_text_or_array_field($_REQUEST['_wpnonce']);
|
1375 |
+
|
1376 |
+
if(wp_verify_nonce( $nonce, 'seoredirection' )){
|
1377 |
+
|
1378 |
+
global $wpdb, $table_prefix, $util;
|
1379 |
+
$table_name = $wpdb->prefix . 'WP_SEO_Redirection';
|
1380 |
+
foreach ($_POST['redirect_id'] as $post_id) {
|
1381 |
+
$post_id = (int)$post_id;
|
1382 |
+
$wpdb->query($wpdb->prepare(" delete from $table_name where ID=%s ", $post_id));
|
1383 |
+
$SR_redirect_cache = new free_SR_redirect_cache();
|
1384 |
+
$SR_redirect_cache->free_cache();
|
1385 |
+
}
|
1386 |
+
}
|
1387 |
}
|
1388 |
}
|
1389 |
}
|