Fix for event serialization, multi-ilne variables or crazy characters in a line could cause parsing errors in consumers of serialized events.

All values are now url encoded to ensure they don't have "dangerous" characters in them.  make sure you url_decode in your language of choice when consuming events in plain format from the event socket.

For those perl or pcre heads out there you can use the following regex:
$value =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/sego;



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3481 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Paul Tinsley committed 2006-11-29 04:57:01 +00:00
1 parent 4ebf67c27a
commit 0c1e83a43f
2 files changed
+43 -4

No files matched your search

+1 -1
View File
@@ -297,7 +297,7 @@ SWITCH_DECLARE(size_t) switch_url_encode(char *url, char *buf, size_t len)
{
char *p;
size_t x = 0;
const char urlunsafe[] = " \"#%&+:;<=>?@[\\]^`{|}";
const char urlunsafe[] = "\r\n %\"#%&+:;<=>?@[\\]^`{|}";
const char hex[] = "0123456789ABCDEF";
memset(buf, 0, len);