aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-15 05:27:24 -0700
committerFriendika <info@friendika.com>2011-08-15 05:27:24 -0700
commit5d6155a9685202b055744549a2cb84e3d8195fd2 (patch)
tree49ea552342aa3c5cb28cb9bf2d786d77be231fe1 /include/diaspora.php
parent9cd77b56ab8253b9c664fe18b8cf6def647f9ca8 (diff)
downloadvolse-hubzilla-5d6155a9685202b055744549a2cb84e3d8195fd2.tar.gz
volse-hubzilla-5d6155a9685202b055744549a2cb84e3d8195fd2.tar.bz2
volse-hubzilla-5d6155a9685202b055744549a2cb84e3d8195fd2.zip
fixes share from diaspora
Diffstat (limited to 'include/diaspora.php')
-rw-r--r--include/diaspora.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 38ee8c1e5..edb273d3c 100644
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -116,6 +116,8 @@ EOT;
function diaspora_decode($importer,$xml) {
+
+
$basedom = parse_xml_string($xml);
$atom = $basedom->children(NAMESPACE_ATOM1);
@@ -129,7 +131,7 @@ function diaspora_decode($importer,$xml) {
openssl_private_decrypt($encrypted_aes_key_bundle,$outer_key_bundle,$importer['prvkey']);
$j_outer_key_bundle = json_decode($outer_key_bundle);
-
+logger('outer: ' . $j_outer_key_bundle);
$outer_iv = base64_decode($j_outer_key_bundle->iv);
$outer_key = base64_decode($j_outer_key_bundle->key);
@@ -150,6 +152,7 @@ function diaspora_decode($importer,$xml) {
* </decrypted_header>
*/
+ logger('decrypted: ' . $decrypted);
$idom = parse_xml_string($decrypted,false);
$inner_iv = base64_decode($idom->iv);
@@ -301,8 +304,8 @@ function diaspora_request($importer,$contact,$xml) {
$hash = random_string() . (string) time(); // Generate a confirm_key
if(is_array($contact_record)) {
- $ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `note`, `hash`, `datetime`)
- VALUES ( %d, %d, 1, %d, '%s', '%s', '%s' )",
+ $ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `note`, `hash`, `datetime`,`blocked`)
+ VALUES ( %d, %d, 1, %d, '%s', '%s', '%s', 0 )",
intval($importer['uid']),
intval($contact_record['id']),
0,