File: 1008_fix-https-access.patch

package info (click to toggle)
slbackup-php 0.4.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 588 kB
  • sloc: php: 983; makefile: 92; sh: 48
file content (22 lines) | stat: -rw-r--r-- 1,066 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Don't access nonhttps array key (in smarty-internal template rendering engine) if it is unset.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Forwarded: https://salsa.debian.org/debian-edu/upstream/slbackup-php/-/commit/d0291d8656c24b20babf3d1d7799c7e434061e84

--- a/templates/login.tpl
+++ b/templates/login.tpl
@@ -22,13 +22,13 @@
     <FORM action="index.php" name=login method=POST>
 	{t 1=$backupuser 2=$backuphost}To read the configuration, you must log in as %1 on %2.{/t}<BR>
 	{t 1=$backupuser 2=$backuphost}Please enter the password for the %1 account on %2:{/t}<BR>
-	{if $nonhttps == "warn"}
+	{if isset($nonhttps) && $nonhttps == "warn"}
 	    <B>
 	    {t}WARNING: you are about to send you password over an unencrypted link, please ask your administrator to enable https{/t}
 	    <BR>
 	    </B>
         {/if}
-	{if $nonhttps == "deny"}
+	{if isset($nonhttps) && $nonhttps == "deny"}
 	    <B>
 	    {t}Login to this application is denied without the use of https. Please ask your administrator to enable https{/t}
 	    <BR>