summaryrefslogtreecommitdiff
path: root/kolab.org
diff options
context:
space:
mode:
authorTorsten Grote <grote@kolabsys.com>2014-01-29 14:58:50 (GMT)
committerTorsten Grote <grote@kolabsys.com>2014-01-29 14:58:50 (GMT)
commit5145fb6b6b03f545d7b82db89850dac1b3b49d78 (patch)
treefbb683a44174eca6d3e27f05ef61690ddca1ab9f /kolab.org
parent4e2be8e55d919b5c1db3aad765792b44bf29ef3b (diff)
downloadkolab.org-www-5145fb6b6b03f545d7b82db89850dac1b3b49d78.tar.gz
update oauth module
Diffstat (limited to 'kolab.org')
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/1365168-4.fastcgi-fix.patch15
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/1404030-2.patch24
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/CHANGELOG8
-rwxr-xr-x[-rw-r--r--]kolab.org/www/drupal-7.18/sites/all/modules/oauth/LICENSE.txt0
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/includes/DrupalOAuthConsumer.inc21
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/includes/DrupalOAuthToken.inc21
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/lib/OAuth.php2
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth-fatal_error_class_OAuthException-1334528-11.patch25
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.authorizations.inc10
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.consumers.inc2
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.info6
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.module4
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common_providerui.info6
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common_providerui.module2
14 files changed, 54 insertions, 92 deletions
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/1365168-4.fastcgi-fix.patch b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/1365168-4.fastcgi-fix.patch
deleted file mode 100644
index 6178f2b..0000000
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/1365168-4.fastcgi-fix.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/lib/OAuth.php b/lib/OAuth.php
-index 2fa374a..ffe9c6d 100644
---- a/lib/OAuth.php
-+++ b/lib/OAuth.php
-@@ -829,6 +829,10 @@ class OAuthUtil {
- $out[$key] = $value;
- }
- }
-+ // The "Authorization" header may get turned into "Auth".
-+ if ($out['Auth']) {
-+ $out['Authorization'] = $out['Auth'];
-+ }
- }
- return $out;
- }
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/1404030-2.patch b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/1404030-2.patch
deleted file mode 100644
index 1d0f6b8..0000000
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/1404030-2.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/oauth_common.pages.inc b/oauth_common.pages.inc
-index ec07abc..e56a9c7 100644
---- a/oauth_common.pages.inc
-+++ b/oauth_common.pages.inc
-@@ -122,7 +122,9 @@ function oauth_common_form_authorize() {
- // Pick the callback url apart and add the token parameter
- $callback = parse_url($consumer->callback_url);
- $query = array();
-- parse_str($callback['query'], $query);
-+ if (!empty($callback['query'])) {
-+ parse_str($callback['query'], $query);
-+ }
- $query['oauth_token'] = $token->key;
- $callback['query'] = http_build_query($query, 'idx_', '&');
-
-@@ -371,7 +373,7 @@ function oauth_common_callback_access_token() {
- // Set the expiry time based on context settings or get parameter
- $expires = !empty($context->authorization_options['access_token_lifetime']) ?
- REQUEST_TIME + $context->authorization_options['access_token_lifetime'] : 0;
-- if ($_GET['expires'] && intval($_GET['expires'])) {
-+ if (!empty($_GET['expires']) && intval($_GET['expires'])) {
- $hint = intval($_GET['expires']);
- // Only accept more restrictive expiry times
- if ($expires == 0 || $hint < $expires) {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/CHANGELOG b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/CHANGELOG
index d6787b3..979e702 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/CHANGELOG
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/CHANGELOG
@@ -1,3 +1,11 @@
+OAuth 7.x-3.2, 2013-24-01
+------------------------------
+Issue #1987350 by juampy: Fixed Warnings when authorizing a consumer via the user interface.
+Issue #1907970 by John Franklin: Fixed patch files snuck into the repository.
+Issue #1809068 by kylebrowning, MrMaksimize, Deciphered: Fixed Cannot leave callback formfield blank even though it is not required.
+Issue #1976504 by rj, Pancho and Nick_vh: Fixed Notice: Undefined index: Auth in OAuthUtil::get_headers()
+Issue #1310984 by aadityawalawalkar | basht: Fixed PDOException with PostgreSQL when viewing page /user/1 if OAuth Provider UI in on.
+
OAuth 7.x-3.1, 2013-2-3
------------------------------
#1529166 by barraponto: implement hook_requirements() to check that cURL library is available.
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/LICENSE.txt b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/LICENSE.txt
index d159169..d159169 100644..100755
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/LICENSE.txt
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/LICENSE.txt
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/includes/DrupalOAuthConsumer.inc b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/includes/DrupalOAuthConsumer.inc
index d1041af..7d6e861 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/includes/DrupalOAuthConsumer.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/includes/DrupalOAuthConsumer.inc
@@ -161,16 +161,21 @@ class DrupalOAuthConsumer extends OAuthConsumer {
public static function loadById($csid, $load_provider_data = TRUE) {
$query = db_select('oauth_common_consumer', 'c');
- $query
- ->condition('c.csid', $csid)
- ->fields('c', array('csid', 'consumer_key', 'secret', 'configuration'));
+ if (is_numeric($csid)) {
+ $query
+ ->condition('c.csid', $csid)
+ ->fields('c', array('csid', 'consumer_key', 'secret', 'configuration'));
- if ($load_provider_data) {
- $query->leftJoin('oauth_common_provider_consumer', 'pc', 'pc.csid = c.csid');
- $query->fields('pc', array('created', 'changed', 'uid', 'name', 'context', 'callback_url'));
- }
+ if ($load_provider_data) {
+ $query->leftJoin('oauth_common_provider_consumer', 'pc', 'pc.csid = c.csid');
+ $query->fields('pc', array('created', 'changed', 'uid', 'name', 'context', 'callback_url'));
+ }
- return self::fromResult($query->execute());
+ return self::fromResult($query->execute());
+ }
+ else {
+ return FALSE;
+ }
}
/**
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/includes/DrupalOAuthToken.inc b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/includes/DrupalOAuthToken.inc
index a9b0993..9040517 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/includes/DrupalOAuthToken.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/includes/DrupalOAuthToken.inc
@@ -202,16 +202,21 @@ class DrupalOAuthToken extends OAuthToken {
public static function loadById($tid, $load_provider_data = TRUE) {
$query = db_select('oauth_common_token', 't');
- $query
- ->condition('t.tid', $tid)
- ->fields('t');
+ if (is_numeric($tid)) {
+ $query
+ ->condition('t.tid', $tid)
+ ->fields('t');
+
+ if ($load_provider_data) {
+ $query->join('oauth_common_provider_token', 'pt', 'pt.tid = t.tid');
+ $query->fields('pt', array('created', 'changed', 'services', 'authorized'));
+ }
- if ($load_provider_data) {
- $query->join('oauth_common_provider_token', 'pt', 'pt.tid = t.tid');
- $query->fields('pt', array('created', 'changed', 'services', 'authorized'));
+ return self::fromResult($query->execute());
+ }
+ else {
+ return FALSE;
}
-
- return self::fromResult($query->execute());
}
/**
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/lib/OAuth.php b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/lib/OAuth.php
index 762db3f..00ea0d5 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/lib/OAuth.php
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/lib/OAuth.php
@@ -840,7 +840,7 @@ class OAuthUtil {
}
}
// The "Authorization" header may get turned into "Auth".
- if ($out['Auth']) {
+ if (isset($out['Auth'])) {
$out['Authorization'] = $out['Auth'];
}
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth-fatal_error_class_OAuthException-1334528-11.patch b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth-fatal_error_class_OAuthException-1334528-11.patch
deleted file mode 100644
index ab555ce..0000000
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth-fatal_error_class_OAuthException-1334528-11.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: /lib/OAuth.php
-IDEA additional info:
-Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
-<+>UTF-8
-===================================================================
---- /lib/OAuth.php (date 1328724051000)
-+++ /lib/OAuth.php (revision )
-@@ -1,10 +1,13 @@
- <?php
- // vim: foldmethod=marker
-
--/* Generic exception class
-+if (!class_exists('OAuthException')) {
-+ /*
-+ * Generic exception class
-- */
--class OAuthException extends Exception {
-- // pass
-+ */
-+ class OAuthException extends Exception {
-+ // pass
-+ }
- }
-
- class OAuthConsumer {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.authorizations.inc b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.authorizations.inc
index af5ab1d..55bf8e7 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.authorizations.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.authorizations.inc
@@ -71,7 +71,15 @@ function oauth_common_page_user_authorizations($account) {
return $table;
}
-function oauth_common_authorization_add($consumer) {
+/**
+ * Page callback to authorize a consumer.
+ *
+ * @param object $account
+ * A user account object.
+ * @param object $consumer
+ * A DrupalOAuthConsumer instance.
+ */
+function oauth_common_authorization_add($account, $consumer) {
$token = new DrupalOAuthToken(user_password(32), user_password(32), $consumer, array(
'uid' => $account->uid,
));
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.consumers.inc b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.consumers.inc
index 723aea2..231ca8f 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.consumers.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.consumers.inc
@@ -187,7 +187,7 @@ function oauth_common_form_consumer_secret_ajax_callback($form, $form_state) {
*/
function oauth_common_form_consumer_validate($form, &$form_state) {
$callback = $form_state['values']['callback_url'];
- if (!parse_url($callback) || strstr($callback, '://') === FALSE) {
+ if (!empty($callback) && (!parse_url($callback) || strstr($callback, '://') === FALSE)) {
form_set_error('callback_url', t('You must set a valid URL as a callback - http/https://some-path or custom://some-path'));
}
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.info b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.info
index be16227..6e53ceb 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.info
@@ -17,9 +17,9 @@ files[] = includes/DrupalOAuthConsumer.inc
files[] = includes/DrupalOAuthClient.inc
files[] = includes/OAuthSignatureMethod_HMAC.inc
-; Information added by drupal.org packaging script on 2013-02-04
-version = "7.x-3.1"
+; Information added by Drupal.org packaging script on 2014-01-24
+version = "7.x-3.2"
core = "7.x"
project = "oauth"
-datestamp = "1359936562"
+datestamp = "1390561406"
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.module b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.module
index 2445926..9c7ea66 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.module
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common.module
@@ -152,7 +152,7 @@ function oauth_common_menu() {
* @param string $key
*/
function oauth_common_consumer_load($csid) {
- $consumer = DrupalOAuthConsumer::loadById($csid, TRUE);
+ $consumer = $csid ? DrupalOAuthConsumer::loadById($csid, TRUE) : FALSE;
if (!$consumer) {
$consumer = FALSE;
}
@@ -165,7 +165,7 @@ function oauth_common_consumer_load($csid) {
* @param string $key
*/
function oauth_common_provider_token_load($tid) {
- $token = DrupalOAuthToken::loadByID($tid);
+ $token = $tid ? DrupalOAuthToken::loadByID($tid) : FALSE;
if (!$token) {
$token = FALSE;
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common_providerui.info b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common_providerui.info
index cd5ca1a..91587c1 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common_providerui.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common_providerui.info
@@ -6,9 +6,9 @@ dependencies[] = oauth_common
core = 7.x
-; Information added by drupal.org packaging script on 2013-02-04
-version = "7.x-3.1"
+; Information added by Drupal.org packaging script on 2014-01-24
+version = "7.x-3.2"
core = "7.x"
project = "oauth"
-datestamp = "1359936562"
+datestamp = "1390561406"
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common_providerui.module b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common_providerui.module
index 7c46bbb..fd0e6da 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common_providerui.module
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/oauth/oauth_common_providerui.module
@@ -150,7 +150,7 @@ function oauth_common_providerui_menu() {
$menu['user/%user/oauth/consumer/%oauth_common_consumer/add-authorization'] = array(
'title' => 'Add authorization',
'page callback' => 'oauth_common_authorization_add',
- 'page arguments' => array(4),
+ 'page arguments' => array(1, 4),
'access callback' => 'oauth_common_can_authorize_consumer',
'access arguments' => array(4),
'file' => 'oauth_common.authorizations.inc',