]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'master' into testing
authorBrion Vibber <brion@pobox.com>
Wed, 8 Sep 2010 18:47:44 +0000 (11:47 -0700)
committerBrion Vibber <brion@pobox.com>
Wed, 8 Sep 2010 18:47:44 +0000 (11:47 -0700)
classes/Notice.php
plugins/OpenID/openid.php
plugins/RSSCloud/RSSCloudQueueHandler.php

index 14477b1b53a2c17122e2baafe7891c304eb678e7..f1b012465b39cbd2c0766ffe8b211802d4d964b0 100644 (file)
@@ -583,7 +583,9 @@ class Notice extends Memcached_DataObject
         if ($f2p->find()) {
             while ($f2p->fetch()) {
                 $f = File::staticGet($f2p->file_id);
-                $att[] = clone($f);
+                if ($f) {
+                    $att[] = clone($f);
+                }
             }
         }
         return $att;
index 4ce350f7737a56d0480e6440d4e1f9a6ef0a0148..1b93163e5f5efb307828e5aba64815e79ffa3ff8 100644 (file)
@@ -182,7 +182,19 @@ function oid_authenticate($openid_url, $returnto, $immediate=false)
     $trust_root = common_root_url(true);
     $process_url = common_local_url($returnto);
 
-    if ($auth_request->shouldSendRedirect()) {
+    // Net::OpenID::Server as used on LiveJournal appears to incorrectly
+    // reject POST requests for data submissions that OpenID 1.1 specs
+    // as GET, although 2.0 allows them:
+    // https://rt.cpan.org/Public/Bug/Display.html?id=42202
+    //
+    // Our OpenID libraries would have switched in the redirect automatically
+    // if it were detecting 1.1 compatibility mode, however the server is
+    // advertising itself as 2.0-compatible, so we got switched to the POST.
+    //
+    // Since the GET should always work anyway, we'll just take out the
+    // autosubmitter for now.
+    // 
+    //if ($auth_request->shouldSendRedirect()) {
         $redirect_url = $auth_request->redirectURL($trust_root,
                                                    $process_url,
                                                    $immediate);
@@ -194,6 +206,7 @@ function oid_authenticate($openid_url, $returnto, $immediate=false)
         } else {
             common_redirect($redirect_url, 303);
         }
+    /*
     } else {
         // Generate form markup and render it.
         $form_id = 'openid_message';
@@ -219,6 +232,7 @@ function oid_authenticate($openid_url, $returnto, $immediate=false)
             $action->handle(array('action' => 'autosubmit'));
         }
     }
+    */
 }
 
 # Half-assed attempt at a module-private function
index 295c261895d6152fd4f9e0051794f00317ed6d71..ef11eda2e78ae3be1fd8a09e59f19471011fae49 100644 (file)
@@ -28,7 +28,12 @@ class RSSCloudQueueHandler extends QueueHandler
 
     function handle($notice)
     {
-        $profile = $notice->getProfile();
+        try {
+            $profile = $notice->getProfile();
+        } catch (Exception $e) {
+            common_log(LOG_ERR, "Dropping RSSCloud item for notice with bogus profile: " . $e->getMessage());
+            return true;
+        }
         $notifier = new RSSCloudNotifier();
         return $notifier->notify($profile);
     }