mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
check checksum of document version
This commit is contained in:
parent
4b91c390c3
commit
8a2224b669
|
@ -6,6 +6,8 @@
|
|||
- fix potential clickjacking attack with manipulated email address of a user
|
||||
- loading more items on ViewFolder page obeys sort order
|
||||
- fix possible csrf attacks due to missing form token
|
||||
- show an error msg on the documents detail page if the checksum of version
|
||||
mismatch
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.21
|
||||
|
|
|
@ -588,6 +588,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
exit;
|
||||
}
|
||||
|
||||
$checksum = SeedDMS_Core_File::checksum($dms->contentDir, $latestContent->getPath());
|
||||
if($checksum != $latestContent->getChecksum()) {
|
||||
$this->errorMsg(getMLText('wrong_checksum'));
|
||||
}
|
||||
|
||||
$txt = $this->callHook('preLatestVersionTab', $latestContent);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
|
|
Loading…
Reference in New Issue
Block a user