mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
[misc] CompileController: exact match for output.pdf
The previous regex could mistake user provided pdf files, like `fake_output.pdf`, as the final output file. The frontend expects to find a `output.pdf` file on success.
This commit is contained in:
@@ -80,11 +80,7 @@ module.exports = CompileController = {
|
||||
let file
|
||||
status = 'failure'
|
||||
for (file of Array.from(outputFiles)) {
|
||||
if (
|
||||
file.path != null
|
||||
? file.path.match(/output\.pdf$/)
|
||||
: undefined
|
||||
) {
|
||||
if (file.path === 'output.pdf') {
|
||||
status = 'success'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user