if non-TLS, show warning in the login form

This commit is contained in:
ed 2023-02-17 22:49:03 +00:00
parent 49e8df25ac
commit 96d6bcf26e
4 changed files with 22 additions and 8 deletions

View file

@ -2877,6 +2877,7 @@ class HttpCli(object):
url_suf=suf,
k304=self.k304(),
ver=S_VERSION if self.args.ver else "",
ahttps="" if self.is_https else "https://" + self.host + self.req,
)
self.reply(html.encode("utf-8"))
return True

View file

@ -36,6 +36,11 @@ a {
td a {
margin: 0;
}
#w {
color: #fff;
background: #940;
border-color: #b70;
}
.af,
.logout {
float: right;
@ -175,15 +180,19 @@ html.z a.g {
border-color: #af4;
box-shadow: 0 .3em 1em #7d0;
}
html.z input {
color: #fff;
background: #626;
border: 1px solid #c2c;
border-width: 1px 0 0 0;
input {
color: #a50;
background: #fff;
border: 1px solid #a50;
border-radius: .5em;
padding: .5em .7em;
margin: 0 .5em 0 0;
}
html.z input {
color: #fff;
background: #626;
border-color: #c2c;
}
html.z .num {
border-color: #777;
}

View file

@ -89,13 +89,16 @@
</ul>
<h1 id="l">login for more:</h1>
<ul>
<div>
<form method="post" enctype="multipart/form-data" action="{{ r }}/{{ qvpath }}">
<input type="hidden" name="act" value="login" />
<input type="password" name="cppwd" />
<input type="submit" value="Login" />
{% if ahttps %}
<a id="w" href="{{ ahttps }}">switch to https</a>
{% endif %}
</form>
</ul>
</div>
</div>
<a href="#" id="repl">π</a>
{%- if not this.args.nb %}

View file

@ -25,7 +25,8 @@ var Ls = {
"t1": "handling",
"u2": "tid siden noen sist skrev til serveren$N( opplastning / navneendring / ... )$N$N17d = 17 dager$N1h23 = 1 time 23 minutter$N4m56 = 4 minuter 56 sekunder",
"v1": "koble til",
"v2": "bruk denne serveren som en lokal harddisk$N$NADVARSEL: kommer til å vise passordet ditt!"
"v2": "bruk denne serveren som en lokal harddisk$N$NADVARSEL: kommer til å vise passordet ditt!",
"w1": "bytt til https",
},
"eng": {
"d2": "shows the state of all active threads",