Plugin Directory

Changeset 3063897


Ignore:
Timestamp:
04/03/2024 03:39:23 PM (2 years ago)
Author:
kp4coder
Message:
  • Fix: Security Update
Location:
sync-post-with-other-site/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sync-post-with-other-site/trunk/SyncPostWithOtherSite.php

    r2972274 r3063897  
    44Plugin URI: https://syncpostwithothersite.in/
    55Description: Allows user to sync post with multiple websites.
    6 Version: 1.4.2
     6Version: 1.5.1
    77Author: kp4coder
    88Author URI: https://syncpostwithothersite.in/author/
     
    5252
    5353global $sps_version;
    54 $sps_version = '1.4.2';
     54$sps_version = '1.5.1';
    5555
    5656class SyncPostWithOtherSite {
  • sync-post-with-other-site/trunk/includes/sps_settings.class.php

    r2675064 r3063897  
    2929
    3030        function sps_save_settings_func( $params = array() ) {
     31            $nonce = wp_create_nonce('sps_nonce');
     32            if ( ! isset( $_POST['sps_general_option_field'] ) || ! wp_verify_nonce( $_POST['sps_general_option_field'], 'sps_nonce' ) ) {
     33                // Nonce verification failed; handle error or exit.
     34                wp_die('verification failed. Please try again');
     35            }
     36
    3137            if( isset( $params['sps_setting'] ) && $params['sps_setting'] != '') {
    3238                $sps_setting = $params['sps_setting'];
    3339                unset( $params['sps_setting'] );
    3440                unset( $params['sps_setting_save'] );
     41
     42                if( isset($params['sps_host_name']) && !empty($params['sps_host_name']) ) {
     43                    $hostnames = array();
     44                    $usernames = array();
     45                    $passwords = array();
     46                    foreach ($params['sps_host_name'] as $key => $hostname) {
     47                        $hostnames[] = sanitize_url($hostname);
     48                        $usernames[] = sanitize_user($params['sps_content_username'][$key]);
     49                        $passwords[] = wp_strip_all_tags($params['sps_content_password'][$key]);
     50                    }
     51
     52                    $params['sps_host_name'] = $hostnames;
     53                    $params['sps_content_username'] = $usernames;
     54                    $params['sps_content_password'] = $passwords;
     55                }
    3556
    3657                update_option('sps_setting', $params);
  • sync-post-with-other-site/trunk/includes/sps_settings.view.php

    r3057293 r3063897  
    2222    global $sps, $sps_settings;
    2323
     24    wp_nonce_field('sps_nonce', 'sps_general_option_field');
    2425    $general_option = $sps_settings->sps_get_settings_func();
    2526    if(!empty($general_option)) {
     
    4950                                    <th><label for="sps_host_name_<?php echo $spcn; ?>"><?php _e('Host Name of Target', SPS_txt_domain); ?></label></th>
    5051                                    <td>
    51                                         <input type="text" name="sps_host_name[<?php echo $spcn; ?>]" id="sps_host_name_<?php echo $spcn; ?>" class="sps_input sps_url" value="<?php echo $sps_host_name ?>" />
     52                                        <input type="text" name="sps_host_name[<?php echo $spcn; ?>]" id="sps_host_name_<?php echo $spcn; ?>" class="sps_input sps_url" value="<?php echo sanitize_url($sps_host_name) ?>" />
    5253                                        <?php if($spcn!=0) { ?>
    5354                                        <a href="javascript:;" class="remove_site" data-site_id="<?php echo $spcn; ?>"> Remove Site </a>
     
    5960                                    <th><label for="sps_content_username_<?php echo $spcn; ?>"><?php _e('Username', SPS_txt_domain); ?></label></th>
    6061                                    <td>
    61                                         <input type="text" name="sps_content_username[<?php echo $spcn; ?>]" id="sps_content_username_<?php echo $spcn; ?>" class="sps_input" value="<?php echo $sps_content_username ?>" />
     62                                        <input type="text" name="sps_content_username[<?php echo $spcn; ?>]" id="sps_content_username_<?php echo $spcn; ?>" class="sps_input" value="<?php echo sanitize_user($sps_content_username) ?>" />
    6263                                        <p><?php _e('Enter', SPS_txt_domain); ?> <span class="sps_username"></span> <?php _e('website username', SPS_txt_domain); ?></p>
    6364                                    </td>
     
    6768                                    <td>
    6869                                        <div class="sps_password_box">
    69                                             <input type="password" name="sps_content_password[<?php echo $spcn; ?>]" id="sps_content_password_<?php echo $spcn; ?>" class="sps_input" value="<?php echo $sps_content_password ?>" />
     70                                            <input type="password" name="sps_content_password[<?php echo $spcn; ?>]" id="sps_content_password_<?php echo $spcn; ?>" class="sps_input" value="<?php echo wp_strip_all_tags( stripslashes($sps_content_password) ) ?>" />
    7071                                            <span class="dashicons dashicons-visibility sps_show_pass"></span>
    7172                                            <span class="dashicons dashicons-hidden sps_hide_pass"></span>
  • sync-post-with-other-site/trunk/readme.txt

    r3057294 r3063897  
    44Tags: wp sync post, sync post content, sync post with multiple sites, post attachments, post content, post content sync, migrate post content, moving post data, synchronization post
    55Requires at least: 4.5
    6 Tested up to: 6.4
     6Tested up to: 6.5
    77Stable tag: 1.3
    88License: GPLv2 or later
     
    9696* Fix: small errors
    9797
     98= 1.5.2 - April 03, 2024 =
     99* Fix: Security Update
     100
    98101== Upgrade notice ==
    99102
Note: See TracChangeset for help on using the changeset viewer.