CVE-2012-1621: Escape errors returned from ajax calls in the checkout pages
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1302218 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -144,11 +144,12 @@ function getServerError(data) {
|
||||
if (data._ERROR_MESSAGE_LIST_ != undefined) {
|
||||
serverErrorHash = data._ERROR_MESSAGE_LIST_;
|
||||
jQuery.each(serverErrorHash, function(i, error) {
|
||||
serverError += error.message + '<br/>';
|
||||
var encodedErrorMessage = jQuery('<div/>').text(error.message).html();
|
||||
serverError += encodedErrorMessage + '<br/>';
|
||||
});
|
||||
}
|
||||
if (data._ERROR_MESSAGE_ != undefined) {
|
||||
serverError = data._ERROR_MESSAGE_;
|
||||
serverError = jQuery('<div/>').text(data._ERROR_MESSAGE_).html();
|
||||
}
|
||||
return serverError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user