From b8ea53d2da0e987fa4123036ef8405afa955cb11 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 6 Aug 2008 13:56:03 +0000 Subject: Central: Escape ": "s If a colon is before a space in any value sent from the Central Server to the Client, it will be interpreted as a NAME-VALUE divider and mess up the Item. So, any wild colon-spaces have been escaped as "__INSTADISC__". Next step is to unescape them when they reach the Client. --- central/trunk/instadisc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'central') diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index 4a9d725..826a830 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php @@ -63,17 +63,20 @@ function instaDisc_sendItem($username, $id) { $verID = rand(1,65536); + $title = str_replace(': ', '__INSTADISC__', $getitem3['title']); + $out = 'ID: ' . $id . "\r\n"; $out .= 'Verification: ' . md5($username . ':' . $getuser3['password'] . ':' . $verID) . "\r\n"; $out .= 'Verification-ID: ' . $verID . "\r\n"; $out .= 'Subscription: ' . $getitem3['subscription'] . "\r\n"; - $out .= 'Title: ' . $getitem3['title'] . "\r\n"; + $out .= 'Title: ' . $title . "\r\n"; $out .= 'Author: ' . $getitem3['author'] . "\r\n"; $out .= 'URL: ' . $getitem3['url'] . "\r\n"; $semantics = unserialize($getitem3['semantics']); foreach ($semantics as $name => $value) { + $value = str_replace(': ', '__INSTADISC__', $value); $out .= $name . ': ' . $value . "\r\n"; } -- cgit 1.4.1