From 525033922d6d2704c169601546825d4358667c47 Mon Sep 17 00:00:00 2001 From: micafer Date: Mon, 29 Feb 2016 11:47:13 +0100 Subject: [PATCH 1/2] Bugfix adding credentials --- credinfo.php | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/credinfo.php b/credinfo.php index 0d39578..83e148c 100644 --- a/credinfo.php +++ b/credinfo.php @@ -50,16 +50,36 @@ $imuser = $_SESSION['user']; $id = $_POST['id']; $type = $_POST['type']; - $host = $_POST['host']; - $username = $_POST['username']; - $password = $_POST['password']; - $token_type = $_POST['token_type']; - $project = $_POST['project']; + + $host = ""; + $username = ""; + $password = ""; + $token_type = ""; + $project = ""; $proxy = ""; $private_key = ""; $public_key = ""; $certificate = ""; - $tenant = $_POST['tenant']; + $tenant = ""; + + if (isset($_POST['host'])) { + $host = $_POST['host']; + } + if (isset($_POST['username'])) { + $username = $_POST['username']; + } + if (isset($_POST['password'])) { + $password = $_POST['password']; + } + if (isset($_POST['token_type'])) { + $token_type = $_POST['token_type']; + } + if (isset($_POST['project'])) { + $project = $_POST['project']; + } + if (isset($_POST['tenant'])) { + $tenant = $_POST['tenant']; + } if (isset($_FILES['proxy']['tmp_name'])) { $proxy = file_get_contents($_FILES['proxy']['tmp_name']); From e31ddd6ca0912b512ba2281f19e0bebc3ff317cc Mon Sep 17 00:00:00 2001 From: micafer Date: Mon, 29 Feb 2016 11:49:48 +0100 Subject: [PATCH 2/2] Bugfix editting credentials --- credinfo.php | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/credinfo.php b/credinfo.php index 83e148c..f9f7722 100644 --- a/credinfo.php +++ b/credinfo.php @@ -104,18 +104,37 @@ if (isset($_POST['id'])) { $rowid = $_POST['rowid']; $id = $_POST['id']; - $type = $_POST['type']; - $host = $_POST['host']; - $username = $_POST['username']; - $password = $_POST['password']; - $token_type = $_POST['token_type']; - $project = $_POST['project']; + + $host = ""; + $username = ""; + $password = ""; + $token_type = ""; + $project = ""; $proxy = ""; $private_key = ""; $public_key = ""; $certificate = ""; - $tenant = $_POST['tenant']; + $tenant = ""; + + if (isset($_POST['host'])) { + $host = $_POST['host']; + } + if (isset($_POST['username'])) { + $username = $_POST['username']; + } + if (isset($_POST['password'])) { + $password = $_POST['password']; + } + if (isset($_POST['token_type'])) { + $token_type = $_POST['token_type']; + } + if (isset($_POST['project'])) { + $project = $_POST['project']; + } + if (isset($_POST['tenant'])) { + $tenant = $_POST['tenant']; + } if (isset($_FILES['proxy']['tmp_name'])) { $proxy = file_get_contents($_FILES['proxy']['tmp_name']);