Version Description
- Important security fixes in Ajax requests
Download this release
Release Info
Developer | osamaesh |
Plugin | SEO Redirection Plugin |
Version | 8.2 |
Comparing to | |
See all releases |
Code changes from version 8.1 to 8.2
- readme.txt +9 -2
- seo-redirection.php +4 -153
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
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: 8.
|
7 |
|
8 |
SEO Redirection is a powerful redirect manager to manage 301 redirects without requiring knowledge of Apache .htaccess files.
|
9 |
|
@@ -73,6 +73,9 @@ Yes, here is the plugin full knowledge base http://www.clogica.com/kb/
|
|
73 |
|
74 |
== Upgrade Notice ==
|
75 |
|
|
|
|
|
|
|
76 |
= 8.1 =
|
77 |
* Important security fixes.
|
78 |
|
@@ -209,6 +212,10 @@ Yes, here is the plugin full knowledge base http://www.clogica.com/kb/
|
|
209 |
|
210 |
== Changelog ==
|
211 |
|
|
|
|
|
|
|
|
|
212 |
= 8.1 =
|
213 |
* Important security fixes.
|
214 |
|
2 |
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.1
|
6 |
+
Stable tag: 8.2
|
7 |
|
8 |
SEO Redirection is a powerful redirect manager to manage 301 redirects without requiring knowledge of Apache .htaccess files.
|
9 |
|
73 |
|
74 |
== Upgrade Notice ==
|
75 |
|
76 |
+
= 8.2 =
|
77 |
+
* Important security fixes in Ajax requests
|
78 |
+
|
79 |
= 8.1 =
|
80 |
* Important security fixes.
|
81 |
|
212 |
|
213 |
== Changelog ==
|
214 |
|
215 |
+
= 8.2 =
|
216 |
+
* Important security fixes in Ajax requests
|
217 |
+
|
218 |
+
|
219 |
= 8.1 =
|
220 |
* Important security fixes.
|
221 |
|
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: 8.
|
8 |
Author URI: https://www.wp-buy.com
|
9 |
Text Domain: seo-redirection
|
10 |
*/
|
@@ -547,9 +547,9 @@ if(!function_exists("WPSR_header_code")) {
|
|
547 |
|
548 |
function WPSR_header_code()
|
549 |
{
|
550 |
-
|
551 |
-
|
552 |
-
if (
|
553 |
|
554 |
wp_register_style('c_admin_css_common', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/' . "style.css");
|
555 |
wp_enqueue_style('sweetalert', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/' . "sweetalert.css");
|
@@ -790,100 +790,7 @@ if(!function_exists("WPSR_customUpdateRec_callback")) {
|
|
790 |
die;
|
791 |
}
|
792 |
}
|
793 |
-
if(!function_exists("WPSR_importFromRedirection_callback")) {
|
794 |
|
795 |
-
add_action("wp_ajax_importFromRedirection", "WPSR_importFromRedirection_callback");
|
796 |
-
function WPSR_importFromRedirection_callback()
|
797 |
-
{
|
798 |
-
global $wpdb;
|
799 |
-
|
800 |
-
$plugins = get_option('active_plugins', array());
|
801 |
-
$found = false;
|
802 |
-
foreach ($plugins as $plugin) {
|
803 |
-
if (strpos(strval($plugin), 'redirection.php') == true && strpos(strval($plugin), 'seo-redirection.php') == FALSE) {
|
804 |
-
if (isset($_REQUEST['offset'])) {
|
805 |
-
$offset = WPSR_sanitize_text_or_array_field($_REQUEST['offset']);
|
806 |
-
$count = 0;
|
807 |
-
$table_name = $wpdb->prefix . 'WP_SEO_Redirection';
|
808 |
-
$table_name_404 = $wpdb->prefix . 'WP_SEO_404_links';
|
809 |
-
|
810 |
-
|
811 |
-
$table_name_ = $wpdb->prefix . 'redirection_items';
|
812 |
-
if (strtolower($wpdb->get_var("show tables like '$table_name_'")) == strtolower($table_name_)) {
|
813 |
-
|
814 |
-
|
815 |
-
$redirects = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}redirection_items order by id limit " . $offset . ",1");
|
816 |
-
if ($redirects) {
|
817 |
-
//print_r($redirects);
|
818 |
-
$udtcnt = 0;
|
819 |
-
$inscnt = 0;
|
820 |
-
foreach ($redirects as $redirect) {
|
821 |
-
$redirect_from = stripslashes($redirect->url);
|
822 |
-
$redirect_from_slash = ltrim(stripslashes($redirect->url), '/');
|
823 |
-
if ($redirect->status == "enabled")
|
824 |
-
$enabled = 1;
|
825 |
-
else
|
826 |
-
$enabled = 0;
|
827 |
-
|
828 |
-
$group_id = 1;
|
829 |
-
if ($redirect->group_id == "1") {
|
830 |
-
$group_id = 2;
|
831 |
-
} else if ($redirect->group_id == "2") {
|
832 |
-
$group_id = 3;
|
833 |
-
}
|
834 |
-
|
835 |
-
$redirect_from_type = $redirect->regex ? 'Regex' : 'Page';
|
836 |
-
$redirect_to_type = $redirect->regex ? 'Regex' : 'Page';
|
837 |
-
$regexp = $redirect->regex ? $redirect->url : '';
|
838 |
-
$redirectID = $wpdb->get_var($wpdb->prepare("select ID from $table_name where redirect_from=%s or redirect_from=%s", $redirect_from, $redirect_from_slash));
|
839 |
-
|
840 |
-
if ($redirectID > 0) {
|
841 |
-
|
842 |
-
$update = $wpdb->query($wpdb->prepare("update $table_name set redirect_from=%s,redirect_to=%s,redirect_type=%d, redirect_from_type=%s, redirect_to_type=%s,regex=%s,enabled=%d, grpID=%d,import_flag=%d, redirect_from_folder_settings=%d,redirect_from_subfolders=%d,redirect_to_folder_settings=%d where ID=%d", $redirect_from, stripslashes($redirect->action_data), intval($redirect->action_code, 10), $redirect_from_type, $redirect_to_type, $regexp, $enabled, $group_id, 1, 0, 0, 0, $redirectID));
|
843 |
-
if ($update) {
|
844 |
-
$udtcnt++;
|
845 |
-
}
|
846 |
-
} else {
|
847 |
-
$wpdb->insert($table_name, array(
|
848 |
-
'redirect_from' => stripslashes($redirect->url),
|
849 |
-
'redirect_to' => stripslashes($redirect->action_data),
|
850 |
-
'redirect_type' => intval($redirect->action_code, 10),
|
851 |
-
'url_type' => 1,
|
852 |
-
'redirect_from_type' => $redirect->regex ? 'Regex' : 'Page',
|
853 |
-
'redirect_from_folder_settings' => 0,
|
854 |
-
'redirect_from_subfolders' => 0,
|
855 |
-
'redirect_to_type' => $redirect->regex ? 'Regex' : 'Page',
|
856 |
-
'redirect_to_folder_settings' => 0,
|
857 |
-
'regex' => $redirect->regex ? $redirect->url : '',
|
858 |
-
'enabled' => $enabled,
|
859 |
-
'grpID' => $group_id,
|
860 |
-
'import_flag' => 1,
|
861 |
-
));
|
862 |
-
|
863 |
-
$inscnt++;
|
864 |
-
$wpdb->query($wpdb->prepare(" delete from $table_name_404 where link=%s ", $redirect_from));
|
865 |
-
$SR_redirect_cache = new free_SR_redirect_cache();
|
866 |
-
$SR_redirect_cache->free_cache();
|
867 |
-
}
|
868 |
-
}
|
869 |
-
$msg = __('Total ', 'seo-redirection') . '<span class="insert_cnt">' . $inscnt . '</span>' . __(' record(s) inserted and ', 'seo-redirection') . '<span class="update_cnt">' . $udtcnt . '</span>' . __(' record(s) updated.', 'seo-redirection');
|
870 |
-
echo json_encode(array('status' => 'success', 'updateCnt' => $udtcnt, 'insertCnt' => $inscnt, 'msg' => $msg));
|
871 |
-
} else {
|
872 |
-
$msg = __('No redirects found to import.', 'seo-redirection');
|
873 |
-
echo json_encode(array('status' => 'error', 'msg' => $msg));
|
874 |
-
}
|
875 |
-
}
|
876 |
-
} else {
|
877 |
-
$msg = __('Something went wrong plase try again.', 'seo-redirection');
|
878 |
-
echo json_encode(array('status' => 'error', 'msg' => $msg));
|
879 |
-
}
|
880 |
-
break;
|
881 |
-
}
|
882 |
-
|
883 |
-
}
|
884 |
-
exit;
|
885 |
-
}
|
886 |
-
}
|
887 |
if(!function_exists("WPSR_admin_menu")) {
|
888 |
|
889 |
function WPSR_admin_menu()
|
@@ -937,7 +844,6 @@ https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/</a>) <p
|
|
937 |
$mytabs->add_file_tab('cutom', __('Custom Redirects', 'seo-redirection'), 'option_page_custome_redirection.php', 'file');
|
938 |
$mytabs->add_file_tab('posts', __('Post Redirects', 'seo-redirection'), 'option_page_post_redirection_list.php', 'file');
|
939 |
$mytabs->add_file_tab('history', __('History', 'seo-redirection'), 'option_page_history.php', 'file');
|
940 |
-
$mytabs->add_file_tab('export_import', __('Export/Import', 'seo-redirection'), 'option_export_import.php', 'file');
|
941 |
$mytabs->add_file_tab('404', '<span style="color:red;"><b>404 Errors</b></span>', 'option_page_404.php', 'file');
|
942 |
$mytabs->add_file_tab('goptions', __('Options', 'seo-redirection'), 'option_page_goptions.php', 'file');
|
943 |
$mytabs->add_file_tab('help', '<span style="color:green;"><b>' . __('Help', 'seo-redirection') . '</b></span>', 'help.php', 'file');
|
@@ -1278,62 +1184,7 @@ function WPSR_admin_notice_callback() {
|
|
1278 |
}
|
1279 |
add_action( 'admin_notices', 'WPSR_admin_notice_callback' );
|
1280 |
}
|
1281 |
-
if(!function_exists("WPSR_import_popup_in_footer")) {
|
1282 |
-
|
1283 |
-
add_action('admin_footer','WPSR_import_popup_in_footer');
|
1284 |
-
function WPSR_import_popup_in_footer()
|
1285 |
-
{
|
1286 |
-
|
1287 |
-
global $wpdb;
|
1288 |
-
global $current_user;
|
1289 |
-
$user_id = $current_user->ID;
|
1290 |
-
$val = get_user_meta($user_id, 'sr_notice_dismissed',true);
|
1291 |
|
1292 |
-
$plugins = get_option( 'active_plugins', array() );
|
1293 |
-
$found = false;
|
1294 |
-
foreach ( $plugins as $plugin )
|
1295 |
-
{
|
1296 |
-
if ( strpos( strval($plugin), 'redirection.php' ) == true && strpos( strval($plugin), 'seo-redirection.php' ) == FALSE )
|
1297 |
-
{
|
1298 |
-
|
1299 |
-
$table_name = $wpdb->prefix . 'redirection_items';
|
1300 |
-
if (strtolower($wpdb->get_var("show tables like '$table_name'")) == strtolower($table_name))
|
1301 |
-
{
|
1302 |
-
|
1303 |
-
$found = true;
|
1304 |
-
$total_org = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}redirection_items");
|
1305 |
-
$total = WPSR_getRedirectCount();
|
1306 |
-
$SR_import = isset($_GET['SR_import']) ? sanitize_text_field($_GET['SR_import']) : '';
|
1307 |
-
|
1308 |
-
|
1309 |
-
if($total > 0 && $SR_import == 'yes'){ ?>
|
1310 |
-
<div class="modal fade" id="import_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" <?php echo $val; ?>>
|
1311 |
-
<div class="modal-dialog" role="document">
|
1312 |
-
<div class="modal-content">
|
1313 |
-
<div class="modal-header">
|
1314 |
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
1315 |
-
<h4 class="modal-title" id="myModalLabel">Import Redirects</h4>
|
1316 |
-
</div>
|
1317 |
-
<div class="modal-body">
|
1318 |
-
<div class="import_msg"></div>
|
1319 |
-
<div class="progress_wrap"></div>
|
1320 |
-
<h3 class="text-center"><?php echo __('Total ','seo-redirection').intval($total).__(' redirects from redirection plugin','seo-redirection'); ?></h3>
|
1321 |
-
</div>
|
1322 |
-
<div class="modal-footer">
|
1323 |
-
<input class="button-primary" id="btnImport" type="button" value="Import It" onclick="return import_function(<?php echo esc_js($total_org); ?>,0)">
|
1324 |
-
<input type="hidden" id="_wpnonce" name="_wpnonce" value="<?php echo esc_attr(wp_create_nonce('seoredirection_import')); ?>" />
|
1325 |
-
<input data-dismiss="modal" aria-label="Close" class="button-primary " type="button" value="Cancel" name="cancel">
|
1326 |
-
</div>
|
1327 |
-
</div>
|
1328 |
-
</div>
|
1329 |
-
</div>
|
1330 |
-
<?php }
|
1331 |
-
break;
|
1332 |
-
}
|
1333 |
-
}
|
1334 |
-
}
|
1335 |
-
}
|
1336 |
-
}
|
1337 |
if(!function_exists("WPSR_dismiss_notice_callback")) {
|
1338 |
|
1339 |
add_action('wp_ajax_sr_dismiss_notice', 'WPSR_dismiss_notice_callback');
|
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: 8.2
|
8 |
Author URI: https://www.wp-buy.com
|
9 |
Text Domain: seo-redirection
|
10 |
*/
|
547 |
|
548 |
function WPSR_header_code()
|
549 |
{
|
550 |
+
|
551 |
+
$my_page = isset($_REQUEST['page']) ? $_REQUEST['page'] : '';
|
552 |
+
if ($my_page == 'seo-redirection.php') {
|
553 |
|
554 |
wp_register_style('c_admin_css_common', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/' . "style.css");
|
555 |
wp_enqueue_style('sweetalert', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/' . "sweetalert.css");
|
790 |
die;
|
791 |
}
|
792 |
}
|
|
|
793 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
794 |
if(!function_exists("WPSR_admin_menu")) {
|
795 |
|
796 |
function WPSR_admin_menu()
|
844 |
$mytabs->add_file_tab('cutom', __('Custom Redirects', 'seo-redirection'), 'option_page_custome_redirection.php', 'file');
|
845 |
$mytabs->add_file_tab('posts', __('Post Redirects', 'seo-redirection'), 'option_page_post_redirection_list.php', 'file');
|
846 |
$mytabs->add_file_tab('history', __('History', 'seo-redirection'), 'option_page_history.php', 'file');
|
|
|
847 |
$mytabs->add_file_tab('404', '<span style="color:red;"><b>404 Errors</b></span>', 'option_page_404.php', 'file');
|
848 |
$mytabs->add_file_tab('goptions', __('Options', 'seo-redirection'), 'option_page_goptions.php', 'file');
|
849 |
$mytabs->add_file_tab('help', '<span style="color:green;"><b>' . __('Help', 'seo-redirection') . '</b></span>', 'help.php', 'file');
|
1184 |
}
|
1185 |
add_action( 'admin_notices', 'WPSR_admin_notice_callback' );
|
1186 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1188 |
if(!function_exists("WPSR_dismiss_notice_callback")) {
|
1189 |
|
1190 |
add_action('wp_ajax_sr_dismiss_notice', 'WPSR_dismiss_notice_callback');
|