From a65e793cb48df26be9fa5d9bc5338221e0c081da Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 15 Feb 2021 20:53:15 +0100 Subject: [PATCH] IXR_Library: do not trim xml values, there's no reason for. closes https://github.com/opnsense/core/pull/4707 xml-rpc isn't used very often these days, it proably doesn't make sense to try to upstream this change since the library doesn't seem to be very active anymore. When values are of non string type, it makes sense to trim() for safety, for strings leading spaces can have a meaning. --- contrib/IXR/IXR_Library.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/IXR/IXR_Library.php b/contrib/IXR/IXR_Library.php index 1a6e3ebe3..5a0973a23 100644 --- a/contrib/IXR/IXR_Library.php +++ b/contrib/IXR/IXR_Library.php @@ -274,7 +274,7 @@ class IXR_Message $valueFlag = true; break; case 'string': - $value = (string)trim($this->_currentTagContents); + $value = (string)$this->_currentTagContents; $valueFlag = true; break; case 'dateTime.iso8601':