From 033935c19406c8468ed75fdd15a3a532f4e25319 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Tue, 12 Oct 2010 20:29:04 -0700 Subject: cleanup to ensure protocol version is passed properly. We will need it if/when any incompatible protocol changes are introduced. --- mod/dfrn_notify.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'mod/dfrn_notify.php') diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 4a23da505..5779b68d2 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -7,6 +7,7 @@ require_once('include/items.php'); function dfrn_notify_post(&$a) { $dfrn_id = notags(trim($_POST['dfrn_id'])); + $dfrn_version = (float) $_POST['dfrn_version']; $challenge = notags(trim($_POST['challenge'])); $data = $_POST['data']; @@ -374,6 +375,8 @@ function dfrn_notify_content(&$a) { // If this is a duplex communication, ours will be the opposite. $dfrn_id = notags(trim($_GET['dfrn_id'])); + $dfrn_version = (float) $_GET['dfrn_version']; + $direction = (-1); if(strpos($dfrn_id,':') == 1) { @@ -435,7 +438,16 @@ function dfrn_notify_content(&$a) { $challenge = bin2hex($challenge); $encrypted_id = bin2hex($encrypted_id); - echo '' . $status . '2.0' . $encrypted_id . '' . $challenge . '' . "\r\n" ; + header("Content-type: text/xml"); + + echo '' . "\r\n" + . '' . "\r\n" + . "\t" . '' . $status . '' . "\r\n" + . "\t" . '' . DFRN_PROTOCOL_VERSION . '' . "\r\n" + . "\t" . '' . $encrypted_id . '' . "\r\n" + . "\t" . '' . $challenge . '' . "\r\n" + . '' . "\r\n" ; + killme(); } -- cgit v1.2.3