Skip to content

Commit

Permalink
Merge branch 'hotfix-0.8.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
chesio committed Feb 23, 2018
2 parents 58599c9 + 35c80a9 commit 930eb6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bc-security.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: BC Security
* Plugin URI: https://github.com/chesio/bc-security
* Description: Helps keeping WordPress websites secure. Plugin requires PHP 7.0 or newer to run.
* Version: 0.8.0
* Version: 0.8.1
* Author: Česlav Przywara <[email protected]>
* Author URI: https://www.chesio.com
* Requires PHP: 7.0
Expand Down
4 changes: 3 additions & 1 deletion classes/BlueChip/Security/Modules/Checksums/Verifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ protected static function checkDirectoryForModifiedFiles(string $path, $checksum
}

// Compare MD5 hashes.
if (md5_file($pathname) !== $checksum) {
// Note that there can be multiple checksums provided for a single file (at least in plugin checksums).
$md5 = md5_file($pathname);
if (is_array($checksum) ? !in_array($md5, $checksum, true) : ($md5 !== $checksum)) {
$modified_files[] = $filename;
}
}
Expand Down

0 comments on commit 930eb6f

Please sign in to comment.