ensure targetRev is limited to headRev in getInternalRevisionAText

This commit is contained in:
webzwo0i 2023-06-25 20:56:28 +02:00
parent 415156f8a7
commit f4c3fd5a73
2 changed files with 6 additions and 0 deletions

View file

@ -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.

View file

@ -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(