Skip to content

Commit 547353b

Browse files
committed
Prohibited uploading of certain files
1 parent 083c15d commit 547353b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Module.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ public function onAfterRename(&$aArgs, &$mResult)
596596
$UserId = $aArgs['UserId'];
597597
Api::CheckAccess($UserId);
598598

599-
if (self::isFileAllowed($aArgs['Name'])) {
599+
if (!self::isFileAllowed($aArgs['Name'])) {
600600
throw new \Aurora\System\Exceptions\ApiException(\Aurora\System\Notifications::CanNotUploadFileErrorData);
601601
}
602602

@@ -664,7 +664,7 @@ public function onAfterMove(&$aArgs, &$mResult)
664664
if (!$bIntoItself) {
665665
$sNewName = isset($aItem['NewName']) ? $aItem['NewName'] : $aItem['Name'];
666666

667-
if (self::IsFileAllowed(basename($sNewName))) {
667+
if (!self::IsFileAllowed(basename($sNewName))) {
668668
throw new \Aurora\System\Exceptions\ApiException(\Aurora\System\Notifications::CanNotUploadFileErrorData);
669669
}
670670

0 commit comments

Comments
 (0)