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("&"):
if "=" in k:
k, zs = k.split("=", 1)
uparam[k.lower()] = zs.strip()
uparam[k.lower()] = unquotep(zs.strip().replace("+", " "))
else:
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:
v = v.replace(";", "")
v = v.replace("%", "%25").replace(";", "%3B")
if dur:
exp = formatdate(time.time() + dur, usegmt=True)
else:
@ -2320,7 +2320,7 @@ def unescape_cookie(orig: str) -> str:
ret += chr(int(esc[1:], 16))
except:
ret += esc
esc = ""
esc = ""
else:
ret += ch

View file

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