fix(eChecklist-import): Fix error with formulas in status column

This should remedy the reported behavior of statuses quietly being changed to "Not Reviewed".
scan.inc - Added new set_Host_Error method to set the error value for a specific host
parse_excel_echecklist.php - explicitly check for the status to equal 1-of-7 expected values, if not, add note to finding, set scan error message, and default status to "Not Reviewed"
export.php - Added cell lock for A11:E{last row} with the default password of "sagacity" (all lowercase)

Fixes #80
This commit is contained in:
2019-01-09 21:49:58 -05:00
parent 8973c2e046
commit 99eb5342cf
3 changed files with 36 additions and 10 deletions

View File

@ -83,7 +83,7 @@ class scan
/**
* Array of hosts
*
* @var array
* @var array:host_list
*/
protected $host_list = array();
@ -613,6 +613,25 @@ class scan
{
$this->host_count = $total_host_count_in;
}
/**
* Method to set a host error
*
* @param int $tgt_id
* @param boolean $is_error
* @param string $err_msg
*/
public function set_Host_Error($tgt_id, $is_error, $err_msg = null)
{
foreach($this->host_list as $x => $h) {
/** @var host_list $h */
if($h->getTargetId() == $tgt_id) {
$this->host_list[$x]->setScanError($is_error);
$this->host_list[$x]->setScanNotes($err_msg);
break;
}
}
}
/**
* Function to return string of the td row for the upload progress page