HandlerPageView: Add misisng check whether passed revision is most recent
Tá an tiomantas seo le fáil i:
tuismitheoir
e4562809a0
tiomantas
2aa11fc2b2
@ -92,7 +92,11 @@ Response HandlerPageView::handleRequest(PageDao &pageDao, std::string pagename,
|
||||
{
|
||||
if(!effectivePermissions(pagename).canSeePageHistory())
|
||||
{
|
||||
return errorResponse("Error", "You are not allowed to view older revisions of this page");
|
||||
auto current = this->database->createRevisionDao()->getCurrentForPage(pagename);
|
||||
if(current && current->revision > revisionid)
|
||||
{
|
||||
return errorResponse("Error", "You are not allowed to view older revisions of this page");
|
||||
}
|
||||
}
|
||||
revision = this->database->createRevisionDao()->getRevisionForPage(pagename, revisionid);
|
||||
if(!revision)
|
||||
|
Á lódáil...
x
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir