Plugin Directory

Changeset 1198145


Ignore:
Timestamp:
07/13/2015 04:39:32 PM (10 years ago)
Author:
josephscott
Message:

Version: 0.4.2

  • Use wp_safe_remote_*() functions for HTTP requests
  • Use openssl_random_pseudo_bytes() ( when available ) instead of mt_rand() when generating tokens
Location:
rsscloud/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • rsscloud/trunk/notification-request.php

    r168474 r1198145  
    4343        $challenge = rsscloud_generate_challenge( );
    4444
    45         $result = wp_remote_get( $notify_url . '?url=' . esc_url( $_POST['url1'] ) . '&challenge=' . $challenge, array( 'method' => 'GET', 'timeout' => RSSCLOUD_HTTP_TIMEOUT, 'user-agent' => RSSCLOUD_USER_AGENT, 'port' => $port, ) );
     45        $result = wp_safe_remote_get( $notify_url . '?url=' . esc_url( $_POST['url1'] ) . '&challenge=' . $challenge, array( 'method' => 'GET', 'timeout' => RSSCLOUD_HTTP_TIMEOUT, 'user-agent' => RSSCLOUD_USER_AGENT, 'port' => $port, ) );
    4646    } else {
    47         $result = wp_remote_post( $notify_url, array( 'method' => 'POST', 'timeout' => RSSCLOUD_HTTP_TIMEOUT, 'user-agent' => RSSCLOUD_USER_AGENT, 'port' => $port, 'body' => array( 'url' => $_POST['url1'] ) ) );
     47        $result = wp_safe_remote_post( $notify_url, array( 'method' => 'POST', 'timeout' => RSSCLOUD_HTTP_TIMEOUT, 'user-agent' => RSSCLOUD_USER_AGENT, 'port' => $port, 'body' => array( 'url' => $_POST['url1'] ) ) );
    4848    }
    4949
  • rsscloud/trunk/readme.txt

    r168486 r1198145  
    33Tags: rss
    44Requires at least: 2.8
    5 Tested up to: 2.8
    6 Stable tag: 0.4.1
     5Tested up to: 4.2
     6Stable tag: 0.4.2
    77
    88Adds RSSCloud ( http://rsscloud.org/ ) capabilities to your RSS feed.
     
    1313
    1414== Changelog ==
     15
     16= 0.4.2 =
     17* Use wp_safe_remote_*() functions for HTTP requests
     18* Use openssl_random_pseudo_bytes() ( when available ) instead of mt_rand() when generating tokens
    1519
    1620= 0.4.1 =
  • rsscloud/trunk/rsscloud.php

    r168474 r1198145  
    8686
    8787    $string = '';
    88     for ( $i = 0; $i < $length; $i++ ) {
    89         $string .= $chars{mt_rand( 0, $chars_length )};
    90     }
     88    if ( function_exists( 'openssl_random_pseudo_bytes' ) ) {
     89        $string = bin2hex( openssl_random_pseudo_bytes( $length / 2 ) );
     90    } else {
     91        for ( $i = 0; $i < $length; $i++ ) {
     92            $string .= $chars{mt_rand( 0, $chars_length - 1)};
     93        }
     94    }
    9195
    9296    return $string;
  • rsscloud/trunk/send-post-notifications.php

    r168415 r1198145  
    2525                $port = $url['port'];
    2626
    27             $result = wp_remote_post( $notify_url, array( 'method' => 'POST', 'timeout' => RSSCLOUD_HTTP_TIMEOUT, 'user-agent' => RSSCLOUD_USER_AGENT, 'port' => $port, 'body' => array( 'url' => $rss2_url ) ) );
     27            $result = wp_safe_remote_post( $notify_url, array( 'method' => 'POST', 'timeout' => RSSCLOUD_HTTP_TIMEOUT, 'user-agent' => RSSCLOUD_USER_AGENT, 'port' => $port, 'body' => array( 'url' => $rss2_url ) ) );
    2828
    2929            do_action( 'rsscloud_send_notification' );
Note: See TracChangeset for help on using the changeset viewer.