diff options
author | Brion Vibber <brion@pobox.com> | 2010-02-23 00:52:47 +0000 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-02-23 00:52:47 +0000 |
commit | 870e556faafa6222bd0e877bd6017ad9277deb4c (patch) | |
tree | cec9ae47680718dfadefeaa1735d14f0a31ddadb | |
parent | d410df040684f443d14bd921c450ca464d52c9d4 (diff) | |
parent | caad5859b51e8d9be87f234ebc91fdf2802816f1 (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
-rw-r--r-- | plugins/OStatus/js/ostatus.js | 3 | ||||
-rw-r--r-- | plugins/OStatus/lib/magicsig.php | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/plugins/OStatus/js/ostatus.js b/plugins/OStatus/js/ostatus.js index 148a05f6f..1fc44b21b 100644 --- a/plugins/OStatus/js/ostatus.js +++ b/plugins/OStatus/js/ostatus.js @@ -63,11 +63,10 @@ SN.U.DialogBox = { f.show(); } else { - a[0].href = (a[0].href.match(/[\\?]/) === null) ? a[0].href+'?' : a[0].href+'&'; $.ajax({ type: 'GET', dataType: 'xml', - url: a[0].href+'ajax=1', + url: a[0].href + ((a[0].href.match(/[\\?]/) === null)?'?':'&') + 'ajax=1', beforeSend: function(formData) { a.addClass('processing'); }, diff --git a/plugins/OStatus/lib/magicsig.php b/plugins/OStatus/lib/magicsig.php index af65bad04..50eb301ab 100644 --- a/plugins/OStatus/lib/magicsig.php +++ b/plugins/OStatus/lib/magicsig.php @@ -57,8 +57,10 @@ class MagicsigRsaSha256 $keypair = new Crypt_RSA_KeyPair($key_length); $params['public_key'] = $keypair->getPublicKey(); $params['private_key'] = $keypair->getPrivateKey(); - + + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $this->keypair = new Crypt_RSA($params); + PEAR::popErrorHandling(); } @@ -79,6 +81,8 @@ class MagicsigRsaSha256 public function fromString($text) { + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + // remove whitespace $text = preg_replace('/\s+/', '', $text); @@ -86,7 +90,6 @@ class MagicsigRsaSha256 if (!preg_match('/RSA\.([^\.]+)\.([^\.]+)(.([^\.]+))?/', $text, $matches)) { return false; } - $mod = base64_url_decode($matches[1]); $exp = base64_url_decode($matches[2]); @@ -110,6 +113,7 @@ class MagicsigRsaSha256 } $this->keypair = new Crypt_RSA($params); + PEAR::popErrorHandling(); } public function getName() |