mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 16:05:05 -04:00
ensure targetRev is limited to headRev in getInternalRevisionAText
This commit is contained in:
parent
415156f8a7
commit
f4c3fd5a73
2 changed files with 6 additions and 0 deletions
|
@ -2,6 +2,9 @@
|
|||
|
||||
### Notable enhancements and fixes
|
||||
|
||||
* Security
|
||||
* Limit requested revisions in timeslider and export to head revision. (affects v1.9.0)
|
||||
|
||||
* Bugfixes
|
||||
* revisions in `CHANGESET_REQ` (timeslider) and export (txt, html, custom)
|
||||
are now checked to be numbers.
|
||||
|
|
|
@ -172,6 +172,9 @@ class Pad {
|
|||
|
||||
async getInternalRevisionAText(targetRev) {
|
||||
const keyRev = this.getKeyRevisionNumber(targetRev);
|
||||
const headRev = this.getHeadRevisionNumber();
|
||||
if (targetRev > headRev)
|
||||
targetRev = headRev;
|
||||
const [keyAText, changesets] = await Promise.all([
|
||||
this._getKeyRevisionAText(keyRev),
|
||||
Promise.all(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue