From 213f832443944a8e3555ecf6b5951b71596fea6f Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 21 Aug 2011 17:24:50 -0700 Subject: add trailing slash to diaspora notify url on send --- boot.php | 2 +- include/diaspora.php | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/boot.php b/boot.php index 302844f57..ae3c04b77 100644 --- a/boot.php +++ b/boot.php @@ -7,7 +7,7 @@ require_once('include/text.php'); require_once("include/pgettext.php"); -define ( 'FRIENDIKA_VERSION', '2.2.1078' ); +define ( 'FRIENDIKA_VERSION', '2.2.1079' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DB_UPDATE_VERSION', 1081 ); diff --git a/include/diaspora.php b/include/diaspora.php index 9b9d2cf8d..541172911 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -83,7 +83,9 @@ EOT; $b64_encrypted_outer_key_bundle = base64_encode($encrypted_outer_key_bundle); $encrypted_header_json_object = json_encode(array('aes_key' => base64_encode($encrypted_outer_key_bundle), 'ciphertext' => base64_encode($ciphertext))); - $encrypted_header = '' . base64_encode($encrypted_header_json_object) . ''; + $cipher_json = base64_encode($encrypted_header_json_object); + + $encrypted_header = '' . $cipher_json . ''; $magic_env = <<< EOT @@ -798,7 +800,7 @@ function diaspora_share($me,$contact) { $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$me,$contact,$me['prvkey'],$contact['pubkey']))); - post_url($contact['notify'],$slap); + post_url($contact['notify'] . '/',$slap); $return_code = $a->get_curl_code(); return $return_code; } @@ -829,7 +831,7 @@ function diaspora_send_status($item,$owner,$contact) { $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey']))); - post_url($contact['notify'],$slap); + post_url($contact['notify'] . '/',$slap); $return_code = $a->get_curl_code(); logger('diaspora_send_status: returns: ' . $return_code); return $return_code; @@ -886,7 +888,7 @@ function diaspora_send_followup($item,$owner,$contact) { $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey']))); - post_url($contact['notify'],$slap); + post_url($contact['notify'] . '/',$slap); $return_code = $a->get_curl_code(); logger('diaspora_send_status: returns: ' . $return_code); return $return_code; @@ -962,7 +964,7 @@ function diaspora_send_relay($item,$owner,$contact) { $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey']))); - post_url($contact['notify'],$slap); + post_url($contact['notify'] . '/',$slap); $return_code = $a->get_curl_code(); logger('diaspora_send_status: returns: ' . $return_code); return $return_code; -- cgit v1.2.3