Plugin Directory

Changeset 2675133


Ignore:
Timestamp:
02/08/2022 03:56:22 PM (4 years ago)
Author:
noncheat
Message:

Version 1.0.25

Location:
stionic-core/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • stionic-core/trunk/admin/class-stionic-admin.php

    r2591532 r2675133  
    216216    function save_taxonomy_order(){
    217217        global $wpdb;
    218         $taxonomy = stripslashes($_POST['taxonomy']);
    219         $unserialised_data = json_decode(stripslashes($_POST['order']), true);
    220         $hideInApp = json_decode(stripslashes($_POST['hide']), true);
    221         $nonce = stripcslashes($_POST['nonce']);
     218        $unserialised_data = !empty($_POST['order']) && is_string($_POST['order']) ? explode(',', $_POST['order']) : array();
     219        $hideInApp = !empty($_POST['hide']) && is_string($_POST['hide']) ? explode(',', $_POST['hide']) : array();
    222220        // check to see if the submitted nonce matches
    223         if ( ! wp_verify_nonce( $nonce, 'stionic-order-category-nonce' ) ) die ( __('Invalid nonce', 'stionic-core') );
     221        if ( ! wp_verify_nonce( $_POST['nonce'], 'stionic-order-category-nonce' ) ) die ( __('Invalid nonce', 'stionic-core') );
    224222        if(!empty($unserialised_data) && is_array($unserialised_data)) foreach($unserialised_data as $key => $values ) {
    225223            $wpdb->update($wpdb->terms, array('term_group' => ($key + 1)), array('term_id' => trim(str_replace("item_", "", $values))));
  • stionic-core/trunk/admin/js/categories.js

    r2518381 r2675133  
    1515    jQuery.post(ajaxurl, {
    1616        action: 'update_taxonomy_order',
    17         order: JSON.stringify(sortable()),
    18         hide: JSON.stringify(hideInApp()),
     17        order: sortable().join(','),
     18        hide: hideInApp().join(','),
    1919        show_all: show_all.is(":checked"),
    2020        check_show: check_show.is(":checked"),
  • stionic-core/trunk/admin/templates/general.php

    r2591532 r2675133  
    2626        if($data['request_timeout'] < 15000) $data['request_timeout'] = 15000;
    2727        $data['root_endpoint'] = sanitize_text_field($_POST['root_endpoint']);
    28         if(isset($_POST['share_android'])) $data['share_android'] = $_POST['share_android'];
    29         if(isset($_POST['share_ios'])) $data['share_ios'] = $_POST['share_ios'];
     28        if(isset($_POST['share_android'])) $data['share_android'] = sanitize_textarea_field($_POST['share_android']);
     29        if(isset($_POST['share_ios'])) $data['share_ios'] = sanitize_textarea_field($_POST['share_ios']);
    3030        $data['version'] = sanitize_text_field($_POST['version']);
    3131        $data['version_ios'] = sanitize_text_field($_POST['version_ios']);
  • stionic-core/trunk/endpoints/class-stionic-tools.php

    r2670363 r2675133  
    3737    function final_url( $request ){
    3838        $params = $request->get_params();
    39         // $params['url'] = esc_url($params['url']);
    40         $ch = curl_init();
    41         curl_setopt($ch, CURLOPT_URL, $params['url']);
    42         curl_setopt($ch, CURLOPT_HEADER, true);
    43         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    44         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    45         $exec = curl_exec($ch);
    46         $data = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
    47         return apply_filters( 'stionic_endpoint_final_url', $data, $request );
     39        $url = $params['url'];
     40        while(true) {
     41            $head = wp_remote_head($url);
     42            if (wp_remote_retrieve_header($head, 'Location') == '') break;
     43            $url = wp_remote_retrieve_header($head, 'Location');
     44        }
     45        return apply_filters( 'stionic_endpoint_final_url', $url, $request );
    4846    }
    4947    function deeplinks($request){
  • stionic-core/trunk/readme.txt

    r2670363 r2675133  
    55Requires at least: 4.7
    66Tested up to: 5.9
    7 Stable tag: 1.0.24
     7Stable tag: 1.0.25
    88Requires PHP: 5.2.4
    99License: GPLv2 or later
     
    7474== Changelog ==
    7575
     76= 1.0.25 =
     77* API final_url use HTTP API Instead of cURL, Validate data
     78
    7679= 1.0.24 =
    7780* Fix deeplinks tool esc_url
     
    177180== Upgrade Notice ==
    178181
     182= 1.0.25 =
     183API final_url use HTTP API Instead of cURL, Validate data
     184
    179185= 1.0.24 =
    180186Fix deeplinks tool esc_url
  • stionic-core/trunk/stionic-core.php

    r2670363 r2675133  
    44 * Plugin URI: https://noncheat.com/category/plugins/stionic-core/
    55 * Description: Extending the REST API for Wordpress application
    6  * Version: 1.0.24
     6 * Version: 1.0.25
    77 * Author: Noncheat
    88 * Author URI: https://noncheat.com
     
    1919        if(!defined('STIONIC_HOME')) define('STIONIC_HOME', plugin_dir_path(__FILE__));
    2020        if(!defined('STIONIC_ASSETS')) define('STIONIC_ASSETS', plugins_url('', __FILE__));
    21         if(!defined('STIONIC_ASSETS_VERSION')) define('STIONIC_ASSETS_VERSION', '1.0.9');
     21        if(!defined('STIONIC_ASSETS_VERSION')) define('STIONIC_ASSETS_VERSION', '1.0.10');
    2222        // require admin
    2323        require_once('admin/class-stionic-admin.php');
Note: See TracChangeset for help on using the changeset viewer.