From 64c63cc56d889184bca7eb3c8b1a8cd76889f401 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Fri, 27 May 2005 08:16:07 +0000 Subject: [PATCH] patch by swiesinger: When using shortcut admin URL, use https:// when specified by user --- docs/NEWS | 3 +++ index.php | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/NEWS b/docs/NEWS index 5ae7698..9793349 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,9 @@ Version 0.9 () ------------------------------------------------------------------------ + * Patch/Bug #1209410 by swiesinger: When using shortcut admin URL, + use https:// when specified by user + * Added swedish translation by Torbjörn Hedberg, Added european portugues translation by Joao Palhoto Matos, Added hungarian translation by Posz Marton diff --git a/index.php b/index.php index c2f1502..afd4a47 100644 --- a/index.php +++ b/index.php @@ -233,7 +233,11 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range print $data; exit; } else if (preg_match(PAT_ADMIN, $uri)) { - header("Location: {$serendipity['baseURL']}serendipity_admin.php"); + $base = $serendipity['baseURL']; + if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { + $base = str_replace('http://', 'https://', $base); + } + header("Location: {$base}serendipity_admin.php"); exit; } else if (preg_match(PAT_ARCHIVE, $uri)) { $serendipity['GET']['action'] = 'archives'; -- 2.39.5