From 1278305de92935bdc4ee2f27076fbbb83917cbec Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 22 Nov 2010 19:58:35 -0800 Subject: [PATCH] salmon error handling issue --- include/auth.php | 2 +- include/salmon.php | 4 +++- mod/register.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/auth.php b/include/auth.php index 0a6050a17..05d5dfd6f 100644 --- a/include/auth.php +++ b/include/auth.php @@ -114,7 +114,7 @@ else { // new account $_SESSION['register'] = 1; $openid->required = array('namePerson/friendly', 'contact/email', 'namePerson'); - $openid->optional = array('namePerson/first'); + $openid->optional = array('namePerson/first','media/image/aspect11'); goaway($openid->authUrl()); // NOTREACHED } diff --git a/include/salmon.php b/include/salmon.php index d998b2704..49384efea 100644 --- a/include/salmon.php +++ b/include/salmon.php @@ -182,7 +182,9 @@ EOT; // check for success, e.g. 2xx - if(($return_code >= 200) && ($return_code < 300)) { + if($return_code > 299) { + + logger('slapper: compliant salmon failed. Falling back to status.net hack'); // Entirely likely that their salmon implementation is // non-compliant. Let's try once more, this time only signing diff --git a/mod/register.php b/mod/register.php index 3b26f6971..69c34f8e9 100644 --- a/mod/register.php +++ b/mod/register.php @@ -49,7 +49,7 @@ function register_post(&$a) { $openid->identity = $openid_url; $openid->returnUrl = $a->get_baseurl() . '/openid'; $openid->required = array('namePerson/friendly', 'contact/email', 'namePerson'); - $openid->optional = array('namePerson/first'); + $openid->optional = array('namePerson/first','media/image/aspect11'); goaway($openid->authUrl()); // NOTREACHED }