[web] download binary files in clsi from filestore via new endpoints (#27505)

* [history-v1] use String.padStart instead of lodash.padStart

* [web] download binary files in clsi from filestore via new endpoints

* [server-ce] tests: Cypress.env() is parsing boolean values

* [server-ce] tests: run history migration as root

GitOrigin-RevId: bdf6c0e542531ccc4b3f13d2ed68ca0d31e580e9
This commit is contained in:
Jakob Ackermann
2025-07-31 08:05:28 +00:00
committed by Copybot
parent 21da0253ce
commit 29045b9085
16 changed files with 334 additions and 240 deletions
+3 -2
View File
@@ -107,13 +107,14 @@ app.post(
cwd: Joi.string().required(),
script: Joi.string().required(),
args: Joi.array().items(Joi.string()),
user: Joi.string().required(),
hasOverleafEnv: Joi.boolean().required(),
},
},
{ allowUnknown: false }
),
(req, res) => {
const { cwd, script, args, hasOverleafEnv } = req.body
const { cwd, script, args, user, hasOverleafEnv } = req.body
const env = hasOverleafEnv
? 'source /etc/overleaf/env.sh || source /etc/sharelatex/env.sh'
@@ -127,7 +128,7 @@ app.post(
'sharelatex',
'bash',
'-c',
`source /etc/container_environment.sh && ${env} && /sbin/setuser www-data node ${JSON.stringify(script)} ${args.map(a => JSON.stringify(a)).join(' ')}`,
`source /etc/container_environment.sh && ${env} && /sbin/setuser ${user} node ${script} ${args.map(a => JSON.stringify(a)).join(' ')}`,
],
(error, stdout, stderr) => {
res.json({