Durgasree
09/04/2020, 1:16 PMvar content = {
errorStatusCode: parseInt(status,10).toString()
, errorCode: code
, errorMessage: message
}
Suggested code in the article:
var content = {
errorStatusCode: parseInt(status, 10).toString(),
errorCode: code,
errorMessage: _.escape(message)
};
Does anybody have idea on what is this vulnerability and how this code addresses it? and why the error messages are breaking ? Thanks in Advance. We also raised a support case on this support case number 3930593 .Durgasree
09/04/2020, 1:36 PMkkennedydesign
09/04/2020, 1:48 PMSteve Goldberg
09/04/2020, 2:01 PMSteve Goldberg
09/04/2020, 2:03 PM{
"gulp": {
"javascript": [
"JavaScript/*.js"
]
},
"overrides": {
"suitecommerce/SspLibraries@X.Y.Z/SuiteScript/ServiceController.js" : "SuiteScript/ServiceController.js"
}
}
We should have instead said:
{
"gulp": {
"ssp-libraries": [
"SuiteScript/*.js"
]
}
, "overrides": {
"suitecommerce/SspLibraries@x.y.z/SuiteScript/ServiceController.js" : "SuiteScript/ServiceController.js"
}
}Steve Goldberg
09/04/2020, 2:03 PMkkennedydesign
09/04/2020, 2:15 PMkkennedydesign
09/04/2020, 2:16 PMSteve Goldberg
09/04/2020, 2:17 PMconst over var. And no, I've not heard anything about the TS thingkkennedydesign
09/04/2020, 2:21 PMDurgasree
09/04/2020, 2:29 PMkkennedydesign
09/04/2020, 2:51 PMkkennedydesign
09/04/2020, 2:52 PMkkennedydesign
09/04/2020, 2:52 PMwbermudo
09/04/2020, 4:14 PMkkennedydesign
09/04/2020, 4:37 PMPaper Plane Netsuite Group
09/10/2020, 6:23 AMDurgasree
09/10/2020, 7:16 AMFlo Meilan
09/14/2020, 9:07 PMtransformResponseText: function(response) {},
b. Go to the method saveForm. Go to the line where the error response of the model.save is processed, below the if condition add this line
self.transformResponseText(response).
It should look like this:
if (response.responseText) {
self.transformResponseText(response);
// code
}
2. For the issue showing up on the screenshot you attached the fix is to go to the LoginRegister.Login.View and add this method:
transformResponseText: function(response) {
response.responseText = _.unescape(response.responseText);
}
If this issue shows up in another page, you will need to go the View that calls the method saveForm that shows the HTML error and add this method:
transformResponseText: function(response) {
response.responseText = _.unescape(response.responseText);
}