1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

fix(sas9): force webout output when executing arbitrary code on SAS9

This commit is contained in:
Krishna Acondy
2021-06-14 09:10:26 +01:00
parent 16a5b2b012
commit c320caec99

View File

@@ -45,7 +45,9 @@ export class SAS9ApiClient {
) {
await this.requestClient.login(userName, password, this.jobsPath)
const formData = generateFileUploadForm(linesOfCode.join('\n'))
// This piece of code forces a webout to prevent Stored Process Errors.
const forceOutputCode = ['data _null_;', 'file _webout;', `put 'Executed sasjs run';`, 'run;']
const formData = generateFileUploadForm([...linesOfCode, ...forceOutputCode].join('\n'))
const codeInjectorPath = `/User Folders/${userName}/My Folder/sasjs/runner`
const contentType =