Remove any carriage returns in text data as they will be
interpreted as end of message by clients and cause communication failure
---
 C4/SIP/Sip.pm |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm
index 558a1d4..f176516 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
-- 
1.6.6.1

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to