Skip to content

Commit 3f5494e

Browse files
committed
Fix. Scanner. Approving. Do not rewrite files status on applying deined hashes rules.
1 parent 4526154 commit 3f5494e

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

inc/spbc-settings.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2832,6 +2832,9 @@ function spbc_field_scanner__prepare_data__files(&$table)
28322832
if ( $row->status === 'APPROVED_BY_CLOUD' ) {
28332833
$status = esc_html__('Cloud analysis', 'security-malware-firewall');
28342834
}
2835+
if ( $row->status === 'APPROVED_BY_USER' ) {
2836+
$status = esc_html__('User', 'security-malware-firewall');
2837+
}
28352838

28362839
if ( !empty($row->status) ) {
28372840
if ( $row->status === 'DENIED_BY_CT' ) {
@@ -2914,7 +2917,9 @@ function spbc_field_scanner__prepare_data__files(&$table)
29142917
. 'denied';
29152918

29162919
$ws_string .= '</p>';
2917-
$table->items[ $key ]['status'] = "Delete, cure or quarantine the file immediately!";
2920+
if ( $table->type !== 'approved' ) {
2921+
$table->items[ $key ]['status'] = __("Delete, cure or quarantine the file immediately!", 'security-malware-firewall');
2922+
}
29182923
}
29192924
}
29202925
}

lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ public function get_denied_hashes() // phpcs:ignore PSR1.Methods.CamelCapsMethod
11401140
severity = \'CRITICAL\',
11411141
weak_spots = \'{"DENIED_HASH":{"1":["denied_hash"]}}\'
11421142
WHERE full_hash IN (\'' . $where . '\')
1143-
AND status <> \'QUARANTINED\';'
1143+
AND status NOT IN (\'QUARANTINED\', \'APPROVED_BY_USER\');'
11441144
);
11451145

11461146
$stage_data_obj->set('count_denied_hashes', count($result));

0 commit comments

Comments
 (0)