You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2017/08/19 18:55:25 UTC

[cloudstack] branch master updated: CLOUDSTACK-9773: Don't break API output with non-printable characters (#1936)

This is an automated email from the ASF dual-hosted git repository.

bhaisaab pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e4d7c7  CLOUDSTACK-9773: Don't break API output with non-printable characters (#1936)
4e4d7c7 is described below

commit 4e4d7c7e36252142d2d997954e87ffba37b34c78
Author: Marc-Aurèle Brothier <m...@brothier.org>
AuthorDate: Sat Aug 19 20:55:20 2017 +0200

    CLOUDSTACK-9773: Don't break API output with non-printable characters (#1936)
---
 server/src/com/cloud/api/ApiServer.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index 40c95a0..9e23774 100644
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -487,8 +487,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
                 final Pattern pattern = Pattern.compile(CONTROL_CHARACTERS);
                 final Matcher matcher = pattern.matcher(value[0]);
                 if (matcher.find()) {
-                    throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Received value " + value[0] + " for parameter " + key +
-                            " is invalid, contains illegal ASCII non-printable characters");
+                    throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Received value containing illegal ASCII non-printable characters for parameter " + key);
                 }
             }
             stringMap.put(key, value[0]);

-- 
To stop receiving notification emails like this one, please contact
['"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>'].