diff --git a/copyparty/__version__.py b/copyparty/__version__.py index 91a7bdf6..9d39a174 100644 --- a/copyparty/__version__.py +++ b/copyparty/__version__.py @@ -1,8 +1,8 @@ # coding: utf-8 -VERSION = (1, 13, 8) -CODENAME = "race the beam" -BUILD_DT = (2024, 8, 13) +VERSION = (1, 14, 0) +CODENAME = "one step forward" +BUILD_DT = (2024, 8, 18) S_VERSION = ".".join(map(str, VERSION)) S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 34713287..bd2c37fc 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -464,6 +464,9 @@ class HttpCli(object): zso = self.headers.get("cookie") if zso: + if len(zso) > 8192: + self.loud_reply("cookie header too big", status=400) + return False zsll = [x.split("=", 1) for x in zso.split(";") if "=" in x] cookies = {k.strip(): unescape_cookie(zs) for k, zs in zsll} cookie_pw = cookies.get("cppws") or cookies.get("cppwd") or "" diff --git a/copyparty/util.py b/copyparty/util.py index 0f879367..eb543434 100644 --- a/copyparty/util.py +++ b/copyparty/util.py @@ -1760,7 +1760,7 @@ def read_header(sr: Unrecv, t_idle: int, t_tot: int) -> list[str]: ofs = ret.find(b"\r\n\r\n") if ofs < 0: - if len(ret) > 1024 * 64: + if len(ret) > 1024 * 32: raise Pebkac(400, "header 2big") else: continue diff --git a/copyparty/web/browser.html b/copyparty/web/browser.html index e479fa0c..1b730e4f 100644 --- a/copyparty/web/browser.html +++ b/copyparty/web/browser.html @@ -67,14 +67,14 @@
- +

🌲 {%- for n in vpnodes %} {{ n[1] }} {%- endfor %}

- +
@@ -118,11 +118,11 @@ - +
{{ "" if sb_lg else logues[1] }}

control-panel

- + π
diff --git a/copyparty/web/browser2.html b/copyparty/web/browser2.html index 4a71282a..7b9053c8 100644 --- a/copyparty/web/browser2.html +++ b/copyparty/web/browser2.html @@ -51,11 +51,11 @@ - + {%- if logues[1] %}
{{ logues[1] }}

{%- endif %} - +

control-panel

diff --git a/copyparty/web/md.html b/copyparty/web/md.html index 8e1722c9..6c03a8b3 100644 --- a/copyparty/web/md.html +++ b/copyparty/web/md.html @@ -49,7 +49,7 @@
Ï€ - + {%- if edit %}
{%- endif %} - +