I'm not having success applying the patch for CVE-2020-14728 for SCA version 2019.2 as described here:
https://netsuite.custhelp.com/app/answers/detail/a_id/94467/kw/94467
When I run gulp ssp-libraries it doesn't appear to be including the changes in the resulting LocalDistributionAdvanced\ssp_libraries.js file. That file updates every time I run that command but the changes are not there. Am I looking at the wrong file?
As the article describes, I put the modified ServiceController.js file under SC_19.2_Live/Commons/extensions/SspLibariesExtension@1.00/SuiteScript and the ns.package.json file is in the SspLibrariesExtension@1.00 folder.
ns.package.json looks like this:
{
"gulp": {
"javascript": [
"JavaScript/*.js"
]
},
"overrides": {
"suitecommerce/SspLibraries/SuiteScript/ServiceController.js" : "SuiteScript/ServiceController.js"
}
}
Then I added the following as the first line in the modules array in SC_19.2_Live/Advanced/distro.json:
"modules": [
"extensions/SspLibrariesExtension",
I have found that when I run gulp ssp-libraries that gulp doesn't see this file. With the above configuration the parseDistroAndModules function in the package-manager ends up looking for ns.package.json in the following path:
SC_19.2_Live\Advanced\extensions\SspLibrariesExtension\ns.package.json
That doesn't exist so it quietly gets skipped.
If I have found that gulp will find the correct ns.package.json file if I change distro.json to this:
"modules": [
"../Commons/extensions/SspLibrariesExtension@1.00",
But then it will look in the wrong place for ServiceControll.js unless I change the path in ns.package.json to this:
{
"gulp": {
"javascript": [
"JavaScript/*.js"
]
},
"overrides": {
"Commons/SspLibraries/SuiteScript/ServiceController.js" : "SuiteScript/ServiceController.js"
}
}
That moves things along. With the above when running gulp ssp-libraries it logs the following (I snipped out the full paths - they are correct):
+--------------------------------------------------------------+
+- SUMMARY OF OVERRIDES
+- File: [...]\SC_19.2_Live\Commons\SspLibraries\SuiteScript\ServiceController.js overridden with: [...]\SC_19.2_Live\Commons\extensions\SspLibrariesExtension@1.00\SuiteScript\ServiceController.js
+--------------------------------------------------------------+
It found it! However, then it ends up looking for ServiceController.ts with a .ts extension instead of a .js extension. It logs the following (again snipping the full path):
'ssp-libraries-no-dep' errored after 4.78 s
Error: ENOENT: no such file or directory, stat '[...]\SC_19.2_Live\Commons\extensions\SspLibrariesExtension@1.00\SuiteScript\ServiceController.ts' [...snip...]
That switch from .js to .ts occurs in the package-manager handleOverrides function no matter what.
And now I'm stuck. What am I doing wrong?