mirror of
https://github.com/itflow-org/itflow
synced 2026-09-22 06:31:15 +00:00
Bugfix: Assets not storing credentials when username not given
This commit is contained in:
@@ -66,7 +66,7 @@ if (isset($_POST['add_asset'])) {
|
||||
// Add Primary Interface
|
||||
mysqli_query($mysqli,"INSERT INTO asset_interfaces SET interface_name = '01', interface_mac = '$mac', interface_ip = '$ip', interface_nat_ip = '$nat_ip', interface_ipv6 = '$ipv6', interface_primary = 1, interface_network_id = $network, interface_asset_id = $asset_id");
|
||||
|
||||
if (!empty($_POST['username'])) {
|
||||
if (!empty($_POST['password'])) {
|
||||
$username = trim(mysqli_real_escape_string($mysqli, encryptCredentialEntry($_POST['username'])));
|
||||
$password = trim(mysqli_real_escape_string($mysqli, encryptCredentialEntry($_POST['password'])));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user