Plugin Directory

Changeset 888832


Ignore:
Timestamp:
04/07/2014 03:50:45 PM (12 years ago)
Author:
perfect-web
Message:
  • Fixed cookie domain name
  • Fixed request timeout and SSL verify
Location:
pwebonedrive/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pwebonedrive/trunk/js/onedrive.js

    r866880 r888832  
    11/**
    2  * @version 1.0.0
     2 * @version 1.0.3
    33 * @package OneDrive
    44 * @copyright © 2014 Perfect Web sp. z o.o., All rights reserved. http://www.perfect-web.co
     
    250250    {
    251251        var exdate = new Date();
    252         document.cookie = "wl_auth=;domain=."+document.location.host+";path=/;expires="+exdate.toUTCString()-1;
     252        document.cookie = "wl_auth=;domain="+document.location.host+";path=/;expires="+exdate.toUTCString()-1;
    253253    },
    254254   
  • pwebonedrive/trunk/liveconnect.php

    r884981 r888832  
    11<?php
    22/**
    3  * @version 1.0.1
     3 * @version 1.0.3
    44 * @package OneDrive
    55 * @copyright © 2014 Perfect Web sp. z o.o., All rights reserved. http://www.perfect-web.co
     
    3737            'storetoken'    => true,
    3838            'usecookie'     => true,
    39             'cookiename'    => 'wl_auth'
     39            'cookiename'    => 'wl_auth',
     40            'timeout'       => 25,
     41            'sslverify'     => false
    4042        );
    4143       
     
    119121            $data['client_secret']  = $this->getOption('clientsecret');
    120122           
    121             $response = $this->http->post($this->getOption('tokenurl'), array('body' => $data));
     123            $response = $this->http->post($this->getOption('tokenurl'), array('body' => $data, 'timeout' => $this->getOption('timeout'), 'sslverify' => $this->getOption('sslverify')));
    122124
    123125            if (is_wp_error($response))
     
    392394                if (!headers_sent())
    393395                {
    394                     setrawcookie($this->getOption('cookiename'), $this->buildQueryString($cookieValues), 0, '/', $_SERVER['SERVER_NAME']);
     396                    setrawcookie($this->getOption('cookiename'), $this->buildQueryString($cookieValues), 0, '/', $_SERVER['HTTP_HOST']);
    395397                }
    396398            }
     
    566568        $data['client_secret']  = $this->getOption('clientsecret');
    567569       
    568         $response = $this->http->post($this->getOption('tokenurl'), array('body' => $data));
     570        $response = $this->http->post($this->getOption('tokenurl'), array('body' => $data, 'timeout' => $this->getOption('timeout'), 'sslverify' => $this->getOption('sslverify')));
    569571
    570572        if (is_wp_error($response))
     
    607609     * @return  WP_Error|array The response or WP_Error on failure.
    608610     */
    609     public function query($url = null, $data = null, $headers = array(), $method = 'get')
     611    public function query($url = null, $data = null, $headers = array(), $method = 'get', $timeout = null)
    610612    {
    611613        $this->log(__METHOD__.'. URL: '.$url.' '.print_r($data, true));
     
    643645        $args = array(
    644646            'method' => $method,
    645             'headers' => $headers
     647            'headers' => $headers,
     648            'timeout' => $timeout > 0 ? $timeout : $this->getOption('timeout'),
     649            'sslverify' => $this->getOption('sslverify')
    646650        );
    647651
     
    709713        $this->log(__METHOD__.'. URL: '.$url);
    710714       
    711         $response = $this->http->get($url, array('headers' => $headers));
     715        $response = $this->http->get($url, array('headers' => $headers, 'timeout' => $this->getOption('timeout'), 'sslverify' => $this->getOption('sslverify')));
    712716       
    713717        if (is_wp_error($response))
  • pwebonedrive/trunk/pwebonedrive.php

    r886240 r888832  
    44 * Plugin URI: http://www.perfect-web.co/wordpress/microsoft-onedrive-gallery-file
    55 * Description: Share easily your photos and files stored on Microsoft OneDrive. You can display a gallery with your photos or a link to a file for download.
    6  * Version: 1.0.2
     6 * Version: 1.0.3
    77 * Author: Piotr Moćko
    88 * Author URI: http://www.perfect-web.co
  • pwebonedrive/trunk/readme.txt

    r886241 r888832  
    55Requires at least: 2.8.0
    66Tested up to: 3.8.1
    7 Stable tag: 1.0.2
     7Stable tag: 1.0.3
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    9898== Changelog ==
    9999
    100 = 1.0.0 =
    101 * First release
     100= 1.0.3 / 07-04-2014 =
     101* Fixed cookie domain name
     102* Fixed request timeout and SSL verify
    102103
    103 = 1.0.1 =
     104= 1.0.2 / 02-04-2014 =
     105* Inform about new option on Live Connect app management
     106
     107= 1.0.1 / 31-03-2014 =
    104108* Backward compatibility with PHP 5.2
    105109
    106 = 1.0.2 =
    107 * Inform about new option on Live Connect app management
     110= 1.0.0 / 28-02-2014 =
     111* First release
    108112
    109113== Upgrade Notice ==
Note: See TracChangeset for help on using the changeset viewer.