aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-08 18:50:04 -0700
committerfriendica <info@friendica.com>2012-08-08 18:50:04 -0700
commit9a39d4ade21af15e9d6a3aae1f467f0d173cc0de (patch)
tree569a3839709bf452b44515dc8c6d3f887f78b9dc /include
parentc28da5673731acbedecb4209c38b72046db597e1 (diff)
downloadvolse-hubzilla-9a39d4ade21af15e9d6a3aae1f467f0d173cc0de.tar.gz
volse-hubzilla-9a39d4ade21af15e9d6a3aae1f467f0d173cc0de.tar.bz2
volse-hubzilla-9a39d4ade21af15e9d6a3aae1f467f0d173cc0de.zip
moving forward again
Diffstat (limited to 'include')
-rw-r--r--include/account.php23
-rw-r--r--include/identity.php8
-rw-r--r--include/network.php7
-rw-r--r--include/zot.php7
4 files changed, 19 insertions, 26 deletions
diff --git a/include/account.php b/include/account.php
index 6e096b8bf..10ef6c525 100644
--- a/include/account.php
+++ b/include/account.php
@@ -9,7 +9,7 @@ require_once('include/datetime.php');
function create_account($arr) {
- // Required: { email, password, password2, tos }
+ // Required: { email, password }
$a = get_app();
$result = array('success' => false, 'user' => null, 'password' => '', 'message' => '');
@@ -60,26 +60,11 @@ function create_account($arr) {
$result['password'] = $new_password;
- require_once('include/crypto.php');
-
- $keys = new_keypair(4096);
-
- if($keys === false) {
- $result['message'] .= t('SERIOUS ERROR: Generation of security keys failed.') . EOL;
- return $result;
- }
-
- $default_service_class = get_config('system','default_service_class');
- if(! $default_service_class)
- $default_service_class = '';
-
-
- $prvkey = $keys['prvkey'];
- $pubkey = $keys['pubkey'];
$r = q("INSERT INTO account
- ( account_parent, account_password, account_email, account_language,
- account_created, account_flags, account_roles, account_expires, account_service_class )
+ ( account_parent, account_password, account_email, account_language,
+ account_created, account_flags, account_roles, account_expires,
+ account_service_class )
VALUES ( %d, '%s', '%s', '%s', '%s', %d, %d, '%s', '%s' )",
intval($parent),
dbesc($password_encoded),
diff --git a/include/identity.php b/include/identity.php
index 7067bc667..5164b5eae 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -4,10 +4,10 @@
class simple_identity {
- private identity_uid;
- private identity_name;
- private identity_url;
- private identity_photo;
+ private $identity_uid;
+ private $identity_name;
+ private $identity_url;
+ private $identity_photo;
function __construct($uid = '',$name = '',$url = '',$photo = '') {
$this->identity_uid = $uid;
diff --git a/include/network.php b/include/network.php
index 0e16f3c2d..8617c1f44 100644
--- a/include/network.php
+++ b/include/network.php
@@ -275,6 +275,13 @@ function z_post_url($url,$params, $headers = null, &$redirects = 0, $timeout = 0
+function json_return_and_die($x) {
+ header("content-type: application/json");
+ echo json_encode($x);
+ killme();
+}
+
+
// Generic XML return
// Outputs a basic dfrn XML status structure to STDOUT, with a <status> variable
diff --git a/include/zot.php b/include/zot.php
index 6fe202aa8..f978971ea 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -52,15 +52,16 @@ function zot_sign(&$item,$identity) {
// Given an item and an identity, verify the signature.
function zot_verify(&$item,$identity) {
- return rsa_verify($item[signed'],base64url_decode($item['signature']),$identity['pubkey']);
+ return rsa_verify($item['signed'],base64url_decode($item['signature']),$identity['pubkey']);
}
function zot_notify($entity,$url) {
$x = z_post_url($url, array(
- 'zot_uid' => $entity['entity_global_id'],
- 'callback' => z_root() . '/zot',
+ 'type' => 'notify',
+ 'guid' => $entity['entity_global_id'],
+ 'callback' => z_root() . '/post',
'spec' => ZOT_REVISION)
);
return($x);