forked from GNUsocial/gnu-social
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts: lib/attachmentlist.php
This commit is contained in:
@@ -27,8 +27,6 @@
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
require_once 'Crypt/RSA.php';
|
||||
|
||||
class Magicsig extends Memcached_DataObject
|
||||
{
|
||||
|
||||
@@ -102,16 +100,16 @@ class Magicsig extends Memcached_DataObject
|
||||
|
||||
public function generate($user_id)
|
||||
{
|
||||
$rsa = new Crypt_RSA();
|
||||
$rsa = new SafeCrypt_RSA();
|
||||
|
||||
$keypair = $rsa->createKey();
|
||||
|
||||
$rsa->loadKey($keypair['privatekey']);
|
||||
|
||||
$this->privateKey = new Crypt_RSA();
|
||||
$this->privateKey = new SafeCrypt_RSA();
|
||||
$this->privateKey->loadKey($keypair['privatekey']);
|
||||
|
||||
$this->publicKey = new Crypt_RSA();
|
||||
$this->publicKey = new SafeCrypt_RSA();
|
||||
$this->publicKey->loadKey($keypair['publickey']);
|
||||
|
||||
$this->user_id = $user_id;
|
||||
@@ -163,7 +161,7 @@ class Magicsig extends Memcached_DataObject
|
||||
{
|
||||
common_log(LOG_DEBUG, "Adding ".$type." key: (".$mod .', '. $exp .")");
|
||||
|
||||
$rsa = new Crypt_RSA();
|
||||
$rsa = new SafeCrypt_RSA();
|
||||
$rsa->signatureMode = CRYPT_RSA_SIGNATURE_PKCS1;
|
||||
$rsa->setHash('sha256');
|
||||
$rsa->modulus = new Math_BigInteger(base64_url_decode($mod), 256);
|
||||
|
@@ -442,6 +442,17 @@ class Ostatus_profile extends Memcached_DataObject
|
||||
{
|
||||
$activity = new Activity($entry, $feed);
|
||||
|
||||
switch ($activity->object->type) {
|
||||
case ActivityObject::ARTICLE:
|
||||
case ActivityObject::BLOGENTRY:
|
||||
case ActivityObject::NOTE:
|
||||
case ActivityObject::STATUS:
|
||||
case ActivityObject::COMMENT:
|
||||
break;
|
||||
default:
|
||||
throw new ClientException("Can't handle that kind of post.");
|
||||
}
|
||||
|
||||
if ($activity->verb == ActivityVerb::POST) {
|
||||
$this->processPost($activity, $source);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user