Skip to content

Commit

Permalink
Improve encrypted zip file detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikuolan committed Nov 6, 2024
1 parent 21cc199 commit e668a2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,4 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co

#### Other changes.
- [2024.11.06]: Added PHP 8.4 to workflows.
- [2024.11.06]: Improved encrypted zip file detection.
6 changes: 3 additions & 3 deletions src/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* License: GNU/GPLv2
* @see LICENSE.txt
*
* This file: The scanner (last modified: 2024.10.15).
* This file: The scanner (last modified: 2024.11.06).
*/

namespace phpMussel\Core;
Expand Down Expand Up @@ -2860,8 +2860,8 @@ private function archiveRecursor(string $Data, string $File = '', int $ScanDepth
* @link https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
*/
if ($this->Loader->Configuration['files']['block_encrypted_archives']) {
$Bits = $this->explodeBits(substr($Data, 6, 2));
if ($Bits && $Bits[7]) {
$Bits = $this->explodeBits(substr($Data, 6, 1));
if ($Bits !== '' && substr($Bits, 7, 1) === '1') {
$this->atHit($DataHash, $DataLen, $ItemRef, sprintf(
$this->Loader->L10N->getString('grammar_exclamation_mark'),
sprintf(
Expand Down

0 comments on commit e668a2a

Please sign in to comment.