mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-09 08:25:00 -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
|
### Notable enhancements and fixes
|
||||||
|
|
||||||
|
* Security
|
||||||
|
* Limit requested revisions in timeslider and export to head revision. (affects v1.9.0)
|
||||||
|
|
||||||
* Bugfixes
|
* Bugfixes
|
||||||
* revisions in `CHANGESET_REQ` (timeslider) and export (txt, html, custom)
|
* revisions in `CHANGESET_REQ` (timeslider) and export (txt, html, custom)
|
||||||
are now checked to be numbers.
|
are now checked to be numbers.
|
||||||
|
|
|
@ -172,6 +172,9 @@ class Pad {
|
||||||
|
|
||||||
async getInternalRevisionAText(targetRev) {
|
async getInternalRevisionAText(targetRev) {
|
||||||
const keyRev = this.getKeyRevisionNumber(targetRev);
|
const keyRev = this.getKeyRevisionNumber(targetRev);
|
||||||
|
const headRev = this.getHeadRevisionNumber();
|
||||||
|
if (targetRev > headRev)
|
||||||
|
targetRev = headRev;
|
||||||
const [keyAText, changesets] = await Promise.all([
|
const [keyAText, changesets] = await Promise.all([
|
||||||
this._getKeyRevisionAText(keyRev),
|
this._getKeyRevisionAText(keyRev),
|
||||||
Promise.all(
|
Promise.all(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue