]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge remote-tracking branch 'upstream/master' into social-master
authorRoland Haeder <roland@mxchange.org>
Sun, 16 Aug 2015 20:46:34 +0000 (22:46 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 16 Aug 2015 20:46:34 +0000 (22:46 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
Conflicts:
actions/apitimelinetag.php

62 files changed:
actions/apitimelinetag.php
avatar/.gitignore [changed mode: 0755->0644]
extlib/Auth/OpenID/Consumer.php
extlib/Auth/OpenID/FileStore.php
extlib/Auth/OpenID/PredisStore.php
extlib/Auth/OpenID/TrustRoot.php
extlib/Auth/OpenID/URINorm.php
extlib/Auth/Yadis/Manager.php
extlib/Auth/Yadis/ParanoidHTTPFetcher.php
extlib/Auth/Yadis/ParseHTML.php
extlib/Auth/Yadis/XML.php
extlib/Auth/Yadis/XRDS.php
extlib/Auth/Yadis/Yadis.php
plugins/DomainStatusNetwork/scripts/installforemail.php [changed mode: 0644->0755]
plugins/DomainStatusNetwork/scripts/proposesite.php [changed mode: 0644->0755]
plugins/DomainStatusNetwork/scripts/sitefordomain.php [changed mode: 0644->0755]
plugins/EmailRegistration/scripts/cancelemailregistration.php [changed mode: 0644->0755]
plugins/EmailRegistration/scripts/registeremailuser.php [changed mode: 0644->0755]
plugins/EmailReminder/scripts/sendemailreminder.php [changed mode: 0644->0755]
plugins/FeedPoller/scripts/pollfeed.php [changed mode: 0644->0755]
plugins/Mapstraction/OpenLayers/img/cloud-popup-relative.png [changed mode: 0755->0644]
plugins/OStatus/scripts/fixup-shadow.php [changed mode: 0644->0755]
plugins/OStatus/scripts/gcfeeds.php [changed mode: 0644->0755]
plugins/OStatus/scripts/renew-feeds.php [changed mode: 0644->0755]
plugins/OStatus/scripts/resub-feed.php [changed mode: 0644->0755]
plugins/OStatus/scripts/rm_bad_feedsubs.php [changed mode: 0644->0755]
plugins/OStatus/scripts/testfeed.php [changed mode: 0644->0755]
plugins/OStatus/scripts/update-profile-data.php [changed mode: 0644->0755]
plugins/OStatus/scripts/update-profile.php [changed mode: 0644->0755]
plugins/OStatus/scripts/update_ostatus_profiles.php [changed mode: 0644->0755]
plugins/OStatus/tests/slap.php [changed mode: 0644->0755]
plugins/Realtime/scripts/cleanupchannels.php [changed mode: 0644->0755]
plugins/RequireValidatedEmail/scripts/registerbyemail.php [changed mode: 0644->0755]
plugins/Sitemap/scripts/updatecounts.php [changed mode: 0644->0755]
plugins/TwitterBridge/daemons/twitterdaemon.php [changed mode: 0644->0755]
plugins/TwitterBridge/scripts/initialize_notice_to_status.php [changed mode: 0644->0755]
scripts/clearcache.php [changed mode: 0644->0755]
scripts/createsim.php [changed mode: 0644->0755]
scripts/dumpschema.php [changed mode: 0644->0755]
scripts/flushrouter.php [changed mode: 0644->0755]
scripts/flushsite.php [changed mode: 0644->0755]
scripts/gnusocialversion.php [changed mode: 0644->0755]
scripts/importtwitteratom.php [changed mode: 0644->0755]
scripts/make-release.php [changed mode: 0644->0755]
scripts/makegroupadmin.php [changed mode: 0644->0755]
scripts/registeruser.php [changed mode: 0644->0755]
scripts/sessiongc.php [changed mode: 0644->0755]
scripts/settag.php [changed mode: 0644->0755]
scripts/showcache.php [changed mode: 0644->0755]
scripts/showtable.php [changed mode: 0644->0755]
scripts/uncache_users.php [changed mode: 0644->0755]
scripts/updatelocation.php [changed mode: 0644->0755]
scripts/updateurls.php [changed mode: 0644->0755]
scripts/upgrade.php [changed mode: 0644->0755]
scripts/userrole.php [changed mode: 0644->0755]
tests/atompub/atompub_test.php [changed mode: 0644->0755]
tests/oauth/oauth_post_notice.php [changed mode: 0644->0755]
theme/neo-quitter/LICENSE [changed mode: 0755->0644]
theme/neo-quitter/default-avatar-mini.png [changed mode: 0755->0644]
theme/neo-quitter/default-avatar-profile.png [changed mode: 0755->0644]
theme/neo-quitter/default-avatar-stream.png [changed mode: 0755->0644]
theme/neo-quitter/favicon.ico [changed mode: 0755->0644]

index 384942a261777e3496d8e4308059ea69024d24d7..7b51a64a084de648be58adb02f30dbd8d0cebff6 100644 (file)
@@ -51,23 +51,10 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction
 {
     var $notices = null;
 
-    /**
-     * Take arguments for running
-     *
-     * @param array $args $_REQUEST args
-     *
-     * @return boolean success flag
-     */
-    function prepare(array $args=array())
+    protected function doPreparation()
     {
-        parent::prepare($args);
-
-        common_debug("apitimelinetag prepare()");
-
         $this->tag     = $this->arg('tag');
         $this->notices = $this->getNotices();
-
-        return true;
     }
 
     /**
@@ -79,9 +66,9 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction
      *
      * @return void
      */
-    function handle(array $args=array())
+    protected function handle()
     {
-        parent::handle($args);
+        parent::handle();
         $this->showTimeline();
     }
 
old mode 100755 (executable)
new mode 100644 (file)
index d562e33f354823498e55109b8670256e92672093..9ac0c500e8c02523716fdc7f56142895694fa3f6 100644 (file)
@@ -29,7 +29,7 @@
  * identity check.
  *
  * LIBRARY DESIGN
- * 
+ *
  * This consumer library is designed with that flow in mind.  The goal
  * is to make it as easy as possible to perform the above steps
  * securely.
@@ -427,7 +427,7 @@ class Auth_OpenID_Consumer {
             $loader->fromSession($endpoint_data);
 
         $message = Auth_OpenID_Message::fromPostArgs($query);
-        $response = $this->consumer->complete($message, $endpoint, 
+        $response = $this->consumer->complete($message, $endpoint,
                                               $current_url);
         $this->session->del($this->_token_key);
 
@@ -616,6 +616,9 @@ class Auth_OpenID_GenericConsumer {
         $this->store = $store;
         $this->negotiator = Auth_OpenID_getDefaultNegotiator();
         $this->_use_assocs = (is_null($this->store) ? false : true);
+        if (get_class($this->store) == "Auth_OpenID_DumbStore") {
+            $this->_use_assocs = false;
+        }
 
         $this->fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
 
@@ -666,7 +669,7 @@ class Auth_OpenID_GenericConsumer {
                                         '_completeInvalid');
 
         return call_user_func_array(array($this, $method),
-                                    array($message, &$endpoint, $return_to));
+                                    array($message, $endpoint, $return_to));
     }
 
     /**
@@ -1186,7 +1189,7 @@ class Auth_OpenID_GenericConsumer {
         list($unused, $services) = call_user_func_array($this->discoverMethod,
                                                         array(
                                                             $claimed_id,
-                                                            &$this->fetcher,
+                                                            $this->fetcher,
                                                         ));
 
         if (!$services) {
@@ -1202,7 +1205,7 @@ class Auth_OpenID_GenericConsumer {
     /**
      * @access private
      */
-    function _verifyDiscoveryServices($claimed_id, 
+    function _verifyDiscoveryServices($claimed_id,
                                       $services, $to_match_endpoints)
     {
         // Search the services resulting from discovery to find one
@@ -1210,7 +1213,7 @@ class Auth_OpenID_GenericConsumer {
 
         foreach ($services as $endpoint) {
             foreach ($to_match_endpoints as $to_match_endpoint) {
-                $result = $this->_verifyDiscoverySingle($endpoint, 
+                $result = $this->_verifyDiscoverySingle($endpoint,
                                                         $to_match_endpoint);
 
                 if (!Auth_OpenID::isFailure($result)) {
@@ -1368,7 +1371,7 @@ class Auth_OpenID_GenericConsumer {
             }
         }
         $ca_message = $message->copy();
-        $ca_message->setArg(Auth_OpenID_OPENID_NS, 'mode', 
+        $ca_message->setArg(Auth_OpenID_OPENID_NS, 'mode',
                             'check_authentication');
         return $ca_message;
     }
@@ -1606,7 +1609,7 @@ class Auth_OpenID_GenericConsumer {
 
         $expires_in = Auth_OpenID::intval($expires_in_str);
         if ($expires_in === false) {
-            
+
             $err = sprintf("Could not parse expires_in from association ".
                            "response %s", print_r($assoc_response, true));
             return new Auth_OpenID_FailureResponse(null, $err);
@@ -1953,7 +1956,7 @@ class Auth_OpenID_AuthRequest {
     function htmlMarkup($realm, $return_to=null, $immediate=false,
                         $form_tag_attrs=null)
     {
-        $form = $this->formMarkup($realm, $return_to, $immediate, 
+        $form = $this->formMarkup($realm, $return_to, $immediate,
                                   $form_tag_attrs);
 
         if (Auth_OpenID::isFailure($form)) {
index 7eec791d24c29d846d48c94f9487b88868b07797..d74f83dcb4e12b2c5a0bed27377ab6417124dedf 100644 (file)
@@ -482,7 +482,7 @@ class Auth_OpenID_FileStore extends Auth_OpenID_OpenIDStore {
         }
 
         if ($handle = opendir($dir)) {
-            while ($item = readdir($handle)) {
+            while (false !== ($item = readdir($handle))) {
                 if (!in_array($item, array('.', '..'))) {
                     if (is_dir($dir . $item)) {
 
index 7108c2faf99cf2b0e793365f40ddd565be2ce2fd..14ecbbd6f8fc619f0f80d571992b966e90d93655 100644 (file)
@@ -104,8 +104,11 @@ class Auth_OpenID_PredisStore extends Auth_OpenID_OpenIDStore {
         
         // no handle given, receiving the latest issued
         $serverKey = $this->associationServerKey($server_url);
-        $lastKey = $this->redis->lpop($serverKey);
-        if (!$lastKey) { return null; }
+        $lastKey = $this->redis->lindex($serverKey, -1);
+        if (!$lastKey) { 
+            // no previous association with this server
+            return null; 
+        }
 
         // get association, return null if failed
         return $this->getAssociationFromServer($lastKey);
@@ -156,10 +159,10 @@ class Auth_OpenID_PredisStore extends Auth_OpenID_OpenIDStore {
         
         // SETNX will set the value only of the key doesn't exist yet.
         $nonceKey = $this->nonceKey($server_url, $salt);
-        $added = $this->predis->setnx($nonceKey);
+        $added = $this->redis->setnx($nonceKey, "1");
         if ($added) {
             // Will set expiration
-            $this->predis->expire($nonceKey, $Auth_OpenID_SKEW);
+            $this->redis->expire($nonceKey, $Auth_OpenID_SKEW);
             return true;
         } else {
             return false;
index 000440b5888649b75f7b3d81f8b29eb283b06450..5e69490788ea020dfc7e05601fb61ec4e5cd9908 100644 (file)
@@ -210,7 +210,7 @@ class Auth_OpenID_TrustRoot {
         if ($parts['host'] == 'localhost') {
             return true;
         }
-        
+
         $host_parts = explode('.', $parts['host']);
         if ($parts['wildcard']) {
             // Remove the empty string from the beginning of the array
@@ -413,7 +413,7 @@ function Auth_OpenID_getAllowedReturnURLs($relying_party_url, $fetcher,
     }
 
     call_user_func_array($discover_function,
-                         array($relying_party_url, &$fetcher));
+                         array($relying_party_url, $fetcher));
 
     $return_to_urls = array();
     $matching_endpoints = Auth_OpenID_extractReturnURL($endpoints);
index c051b550aa1b1e3d339cb7110f6bc80ddedaa8d8..32e84588dbe77f55f7daeb849163bb946a26c40c 100644 (file)
@@ -93,7 +93,17 @@ function Auth_OpenID_pct_encoded_replace_unreserved($mo)
 
 function Auth_OpenID_pct_encoded_replace($mo)
 {
-    return chr(intval($mo[1], 16));
+    $code = intval($mo[1], 16);
+
+    // Prevent request splitting by ignoring newline and space characters
+    if($code === 0xA || $code === 0xD || $code === ord(' '))
+    {
+        return $mo[0];
+    }
+    else
+    {
+        return chr($code);
+    }
 }
 
 function Auth_OpenID_remove_dot_segments($path)
index 15e69079bb7cb48e7324922601c7097a3d9062b0..664521c9ceba2de255edd9bc2bb7bfde264e47bf 100644 (file)
@@ -414,7 +414,7 @@ class Auth_Yadis_Discovery {
             list($yadis_url, $services) = call_user_func_array($discover_cb,
                                                                array(
                                                                 $this->url,
-                                                                &$fetcher,
+                                                                $fetcher,
                                                                ));
 
             $manager = $this->createManager($services, $yadis_url);
index 125029c4cb9f114cb896fd24955e4ed22df0da34..627ea9a8a2a09233cd3fca7fd3e25dfe560d2db5 100644 (file)
@@ -90,6 +90,15 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher {
             $this->reset();
 
             $c = curl_init();
+            if (defined('Auth_OpenID_DISABLE_SSL_VERIFYPEER')
+                    && Auth_OpenID_DISABLE_SSL_VERIFYPEER === true) {
+                trigger_error(
+                    'You have disabled SSL verifcation, this is a TERRIBLE ' .
+                    'idea in almost all cases. Set Auth_OpenID_DISABLE_SSL_' .
+                    'VERIFYPEER to false if you want to be safe again',
+                    E_USER_WARNING);
+                curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
+            }
 
             if ($c === false) {
                 Auth_OpenID::log(
index 6f0f8b7e282574a62b651a5f470bab923b40d324..255d7cd27c813e25049ab443337d3e21a3b3b3dd 100644 (file)
@@ -65,29 +65,6 @@ class Auth_Yadis_ParseHTML {
                                       $this->_entity_replacements));
     }
 
-    /**
-     * Replace HTML entities (amp, lt, gt, and quot) as well as
-     * numeric entities (e.g. #x9f;) with their actual values and
-     * return the new string.
-     *
-     * @access private
-     * @param string $str The string in which to look for entities
-     * @return string $new_str The new string entities decoded
-     */
-    function replaceEntities($str)
-    {
-        foreach ($this->_entity_replacements as $old => $new) {
-            $str = preg_replace(sprintf("/&%s;/", $old), $new, $str);
-        }
-
-        // Replace numeric entities because html_entity_decode doesn't
-        // do it for us.
-        $str = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $str);
-        $str = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $str);
-
-        return $str;
-    }
-
     /**
      * Strip single and double quotes off of a string, if they are
      * present.
@@ -216,7 +193,7 @@ class Auth_Yadis_ParseHTML {
             $link_attrs = array();
             foreach ($attr_matches[0] as $index => $full_match) {
                 $name = $attr_matches[1][$index];
-                $value = $this->replaceEntities(
+                $value = html_entity_decode(
                               $this->removeQuotes($attr_matches[2][$index]));
 
                 $link_attrs[strtolower($name)] = $value;
index 39a9942220cadf1f9268d3f52e510f845f1c556a..2b8a20eb311287450cd0d44a7a28c7e3c96af518 100644 (file)
@@ -250,6 +250,10 @@ class Auth_Yadis_dom extends Auth_Yadis_XMLParser {
             return false;
         }
 
+        if (isset($this->doc->doctype)) {
+            return false;
+        }
+
         $this->xpath = new DOMXPath($this->doc);
 
         if ($this->xpath) {
@@ -343,11 +347,11 @@ function Auth_Yadis_getSupportedExtensions()
 function Auth_Yadis_getXMLParser()
 {
     global $__Auth_Yadis_defaultParser;
-    
+
     if (isset($__Auth_Yadis_defaultParser)) {
         return $__Auth_Yadis_defaultParser;
     }
-    
+
     foreach(Auth_Yadis_getSupportedExtensions() as $extension => $classname)
     {
       if (extension_loaded($extension))
@@ -357,7 +361,7 @@ function Auth_Yadis_getXMLParser()
         return $p;
       }
     }
-    
+
     return false;
 }
 
index 1f5af96fb21a69c0dcc0641fde44567eb72e9a24..044d1e761cb0776c7b1e75c8c24ce2f11ab9aeee 100644 (file)
@@ -429,7 +429,7 @@ class Auth_Yadis_XRDS {
 
                 foreach ($filters as $filter) {
 
-                    if (call_user_func_array($filter, array(&$service))) {
+                    if (call_user_func_array($filter, array($service))) {
                         $matches++;
 
                         if ($filter_mode == SERVICES_YADIS_MATCH_ANY) {
index 9ea2db7f91f5c9aa626912235d6d239a0afa4577..f8853671e207b1ca292a3ee04ad441a03e59651b 100644 (file)
@@ -141,7 +141,7 @@ function Auth_Yadis_getServiceEndpoints($input_url, $xrds_parse_func,
     }
 
     $yadis_result = call_user_func_array($discover_func,
-                                         array($input_url, &$fetcher));
+                                         array($input_url, $fetcher));
 
     if ($yadis_result === null) {
         return array($input_url, array());
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)