support ';' in passwords

This commit is contained in:
ed 2023-05-06 18:54:55 +00:00
parent 8b0e66122f
commit 4ee81af8f6
3 changed files with 4 additions and 5 deletions

View file

@ -331,7 +331,7 @@ class HttpCli(object):
for k in arglist.split("&"): for k in arglist.split("&"):
if "=" in k: if "=" in k:
k, zs = k.split("=", 1) k, zs = k.split("=", 1)
uparam[k.lower()] = zs.strip() uparam[k.lower()] = unquotep(zs.strip().replace("+", " "))
else: else:
uparam[k.lower()] = "" uparam[k.lower()] = ""

View file

@ -1593,7 +1593,7 @@ def gen_filekey_dbg(
def gencookie(k: str, v: str, r: str, tls: bool, dur: Optional[int]) -> str: def gencookie(k: str, v: str, r: str, tls: bool, dur: Optional[int]) -> str:
v = v.replace(";", "") v = v.replace("%", "%25").replace(";", "%3B")
if dur: if dur:
exp = formatdate(time.time() + dur, usegmt=True) exp = formatdate(time.time() + dur, usegmt=True)
else: else:

View file

@ -742,7 +742,7 @@ function get_pwd() {
if (pwd.length < 2) if (pwd.length < 2)
return null; return null;
return pwd[1].split(';')[0]; return decodeURIComponent(pwd[1].split(';')[0]);
} }
@ -1769,7 +1769,6 @@ function cprop(name) {
function bchrome() { function bchrome() {
console.log(document.documentElement.className);
var v, o = QS('meta[name=theme-color]'); var v, o = QS('meta[name=theme-color]');
if (!o) if (!o)
return; return;