From e7f7693b2f28ad87c232db51f1101e720fb29623 Mon Sep 17 00:00:00 2001 From: Tom Needham Date: Wed, 1 Aug 2012 10:21:33 +0100 Subject: [PATCH] Fix 3rdparty paths, initialise OAuth in correct order --- lib/oauth.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/oauth.php b/lib/oauth.php index 09dbe4cc75..0c6e9af725 100644 --- a/lib/oauth.php +++ b/lib/oauth.php @@ -37,12 +37,13 @@ class OC_OAuth { */ private static function init(){ // Include the libraries - require_once(OC::$THIRDPARTYROOT.'3rdparty/oauth-php/library/OAuthServer.php'); - require_once(OC::$THIRDPARTYROOT.'3rdparty/oauth-php/library/OAuthStore.php'); + require_once(OC::$THIRDPARTYROOT.'/3rdparty/oauth-php/library/OAuthServer.php'); + require_once(OC::$THIRDPARTYROOT.'/3rdparty/oauth-php/library/OAuthStore.php'); + require_once(OC::$THIRDPARTYROOT.'/3rdparty/oauth-php/library/OAuthRequestVerifier.php'); + // Initialise the OAuth store + self::$store = OAuthStore::instance('Session'); // Create the server object self::$server = new OAuthServer(); - // Initialise the OAuth store - self::$store = OAuthStore::instance('owncloud'); } /** @@ -109,6 +110,7 @@ class OC_OAuth { * @return string|int */ public static function isAuthorised(){ + self::init(); if(OAuthRequestVerifier::requestIsSigned()){ try{ $req = new OAuthRequestVerifier();