From 1482a7e8fd84ea56f99e0f31cd71ee46008e8dd1 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 11 Dec 2012 23:36:26 +0200 Subject: [PATCH] fixed bug with missing new line in ssl certificate --- web/add/web/index.php | 3 +++ web/edit/web/index.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/web/add/web/index.php b/web/add/web/index.php index cd3801a7d..66bfe7b4a 100644 --- a/web/add/web/index.php +++ b/web/add/web/index.php @@ -182,6 +182,7 @@ top_panel($user,$TAB); if (!empty($_POST['v_ssl_crt'])) { $fp = fopen($tmpdir."/".$_POST['v_domain'].".crt", 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_crt'])); + fwrite($fp, "\n"); fclose($fp); } @@ -189,6 +190,7 @@ top_panel($user,$TAB); if (!empty($_POST['v_ssl_key'])) { $fp = fopen($tmpdir."/".$_POST['v_domain'].".key", 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_key'])); + fwrite($fp, "\n"); fclose($fp); } @@ -196,6 +198,7 @@ top_panel($user,$TAB); if (!empty($_POST['v_ssl_ca'])) { $fp = fopen($tmpdir."/".$_POST['v_domain'].".ca", 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_ca'])); + fwrite($fp, "\n"); fclose($fp); } diff --git a/web/edit/web/index.php b/web/edit/web/index.php index 37b7e70d8..f453fb5ba 100644 --- a/web/edit/web/index.php +++ b/web/edit/web/index.php @@ -272,6 +272,7 @@ top_panel($user,$TAB); if (!empty($_POST['v_ssl_crt'])) { $fp = fopen($tmpdir."/".$_POST['v_domain'].".crt", 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_crt'])); + fwrite($fp, "\n"); fclose($fp); } @@ -279,6 +280,7 @@ top_panel($user,$TAB); if (!empty($_POST['v_ssl_key'])) { $fp = fopen($tmpdir."/".$_POST['v_domain'].".key", 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_key'])); + fwrite($fp, "\n"); fclose($fp); } @@ -286,6 +288,7 @@ top_panel($user,$TAB); if (!empty($_POST['v_ssl_ca'])) { $fp = fopen($tmpdir."/".$_POST['v_domain'].".ca", 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_ca'])); + fwrite($fp, "\n"); fclose($fp); }