mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
Security: Fix revision parsing (#5772)
A carefully crated URL can cause Etherpad to hang.
This commit is contained in:
parent
1d289520eb
commit
1e98033632
9 changed files with 325 additions and 29 deletions
|
@ -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