Details
-
Bug
-
Status: Closed
-
Medium
-
Resolution: Done
-
Guilin Release, Honolulu Release, Istanbul Release, Jakarta Release
-
None
-
Policy 08/02/22-01/03/22
Description
This bug was previously documented in POLICY-2853, but never fixed.
The code takes in a request parameter and stores it in a global variable:
public ApexApiResult uploadModel(@QueryParam("userId") final String userid) { if (!StringUtils.isBlank(userid)) { ApexEditorMain.getParameters().setUploadUserid(userid); } return processRestCommand(RestCommandType.MODEL, RestCommand.UPLOAD); }
Thus if two users upload at the same time, one userId may overwrite the other.
An appropriate fix would be to use userId param only for this request if specified, otherwise use the upload-userid command line param specified at apex-editor startup. This will work as ApexFiles.js sets the userId param for each upload request:
function files_fileUpload() { let requestURL = window.restRootURL + "/Model/Upload"; const userId = new URLSearchParams(window.location.search).get('userId'); if (userId) { requestURL = requestURL + "?userId=" + userId; } // ... }
Attachments
Issue Links
- relates to
-
POLICY-2853 Make APEX editor userId thread safe
-
- Closed
-