mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
export: Don't leak writeable pad ID when exporting
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
This commit is contained in:
parent
58bd96ce8f
commit
dbd76f0c5d
4 changed files with 30 additions and 20 deletions
|
@ -56,14 +56,14 @@ exports.doExport = async (req, res, padId, readOnlyId, type) => {
|
|||
// if this is a plain text export, we can do this directly
|
||||
// We have to over engineer this because tabs are stored as attributes and not plain text
|
||||
if (type === 'etherpad') {
|
||||
const pad = await exportEtherpad.getPadRaw(padId);
|
||||
const pad = await exportEtherpad.getPadRaw(padId, readOnlyId);
|
||||
res.send(pad);
|
||||
} else if (type === 'txt') {
|
||||
const txt = await exporttxt.getPadTXTDocument(padId, req.params.rev);
|
||||
res.send(txt);
|
||||
} else {
|
||||
// render the html document
|
||||
let html = await exporthtml.getPadHTMLDocument(padId, req.params.rev);
|
||||
let html = await exporthtml.getPadHTMLDocument(padId, req.params.rev, readOnlyId);
|
||||
|
||||
// decide what to do with the html export
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue