mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-9773: Don't break API output with non-printable characters (#1936)
This commit is contained in:
parent
d450e1acc0
commit
4e4d7c7e36
@ -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]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user