Commit f357243
Prevent path traversal via bibliography metadata field
The bibliography filename is read from the submitter-controlled
paper.yml / paper.md front matter and concatenated to the paper's
directory with no normalisation, so a value like
"../../../../etc/hosts" resolves outside the clone directory.
BibTeX.open then reads that file and any unparseable lines are
echoed back into the public review issue via DOIWorker.
Clamp the bibliography filename with File.basename so the lookup
always stays inside the paper's directory.1 parent 86fa5b8 commit f357243
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
| |||
0 commit comments