From: Colin Campbell Date: Tue, 23 Feb 2010 11:12:32 +0000 (+0000) Subject: Bug 2653 Protect against sending End of Message in Text X-Git-Tag: v3.02.00-alpha2~211 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=f7f3dadd2e34cf893955db29168b3860481e74b9;p=koha.git 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 --- 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