From f7f3dadd2e34cf893955db29168b3860481e74b9 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Tue, 23 Feb 2010 11:12:32 +0000 Subject: [PATCH] Bug 2653 Protect against sending End of Message in Text Remove any carriage returns in text data as they will be interpreted as end of message by clients and cause communication failure Signed-off-by: Galen Charlton --- C4/SIP/Sip.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm index 558a1d4000..f176516b99 100644 --- a/C4/SIP/Sip.pm +++ b/C4/SIP/Sip.pm @@ -65,6 +65,8 @@ sub add_field { $field_id); $value = ''; } + $value=~s/\r/ /g; # CR terminates a sip message + # Protect against them in sip text fields # Replace any occurences of the field delimiter in the # field value with the HTML character entity -- 2.39.5