diff options
author | 2018-12-09 21:08:59 -0800 | |
---|---|---|
committer | 2018-12-09 21:08:59 -0800 | |
commit | 2a8844ce2c1ebe0f206ea366120eea3734a9cbd3 (patch) | |
tree | 9bce01b2313063b837437f5513d01487d64e7b6a /php/admin/os.php | |
parent | Add sentry.pl with config moved to its own file (diff) | |
download | bouncer-2a8844ce2c1ebe0f206ea366120eea3734a9cbd3.tar.gz bouncer-2a8844ce2c1ebe0f206ea366120eea3734a9cbd3.tar.bz2 bouncer-2a8844ce2c1ebe0f206ea366120eea3734a9cbd3.zip |
Avoid HTTP downgrades
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'php/admin/os.php')
-rw-r--r-- | php/admin/os.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/php/admin/os.php b/php/admin/os.php index 8be6c0e..f554094 100644 --- a/php/admin/os.php +++ b/php/admin/os.php @@ -11,7 +11,7 @@ require_once('../cfg/init.php'); if (!empty($_POST['add-submit'])&&!empty($_POST['os_name'])) { if (Mirror::insert_os($_POST['os_name'],$_POST['os_priority'])) { set_msg('OS added successfully.'); - header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/os.php'); + header('Location: '.$_SERVER['HTTP_PROTO'].'://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/os.php'); exit; } else { set_error('OS could not be added because of an unknown error.'); @@ -26,7 +26,7 @@ if (!empty($_POST['submit'])) { if (!empty($_POST['doit'])) { if (Mirror::update_os($_POST['os_id'],$_POST['os_name'],$_POST['os_priority'])) { set_msg('OS updated successfully.'); - header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/os.php'); + header('Location: '.$_SERVER['HTTP_PROTO'].'://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/os.php'); exit; } else { set_error('OS update failed.'); |