mirror of https://github.com/apache/cloudstack.git
Bugfix: Do not URL-decode API parameters twice.
There's no need to call ApiServer's handleRequest with decode=true since Tomcat has already url-decoded the parameters. URL-decoding twice breaks all Base64 encoded data such as userData in deployVM, since %2b decodes to ' ', not '+' as it should.
This commit is contained in:
parent
32c68e1583
commit
a013640180
|
|
@ -263,7 +263,7 @@ public class ApiServlet extends HttpServlet {
|
|||
auditTrailSb.insert(0, "(userId="+UserContext.current().getCallerUserId()+ " accountId="+UserContext.current().getCaller().getId()+ " sessionId="+(session != null ? session.getId() : null)+ ")" );
|
||||
|
||||
try {
|
||||
String response = _apiServer.handleRequest(params, true, responseType, auditTrailSb);
|
||||
String response = _apiServer.handleRequest(params, false, responseType, auditTrailSb);
|
||||
writeResponse(resp, response != null ? response : "", HttpServletResponse.SC_OK, responseType);
|
||||
} catch (ServerApiException se) {
|
||||
String serializedResponseText = _apiServer.getSerializedApiError(se.getErrorCode(), se.getDescription(), params, responseType);
|
||||
|
|
|
|||
Loading…
Reference in New Issue