From ae5c4a01091b336a90bccf9a552df8b3c52db3b6 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 23 Sep 2022 22:32:04 +0200 Subject: [PATCH] update webdeps + isort + readme --- README.md | 7 +++++-- copyparty/__main__.py | 2 +- copyparty/broker_mpw.py | 2 +- copyparty/broker_util.py | 2 +- copyparty/mtag.py | 2 +- copyparty/util.py | 4 ++-- docs/changelog.md | 20 ++++++++++++++++++++ scripts/deps-docker/Dockerfile | 8 ++++---- 8 files changed, 35 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 0d54f0f8..3685e520 100644 --- a/README.md +++ b/README.md @@ -333,12 +333,14 @@ examples: * `u1` can upload files, browse the folder, and see the generated accesskeys * other users cannot browse the folder, but can access the files if they have the full file URL with the accesskey +anyone trying to bruteforce a password gets banned according to `--ban-pw`; default is 24h ban for 9 failed attempts in 1 hour + # the browser accessing a copyparty server using a web-browser -![copyparty-browser-fs8](https://user-images.githubusercontent.com/241032/129635359-d6dd9b07-8079-4020-ad77-2bfdb9ebd8d5.png) +![copyparty-browser-fs8](https://user-images.githubusercontent.com/241032/192042695-522b3ec7-6845-494a-abdb-d1c0d0e23801.png) ## tabs @@ -497,7 +499,7 @@ see [up2k](#up2k) for details on how it works, or watch a [demo video](https://a **protip:** you can avoid scaring away users with [contrib/plugins/minimal-up2k.html](contrib/plugins/minimal-up2k.html) which makes it look [much simpler](https://user-images.githubusercontent.com/241032/118311195-dd6ca380-b4ef-11eb-86f3-75a3ff2e1332.png) -**protip:** if you enable `favicon` in the `[⚙️] settings` tab (by typing something into the textbox), the icon in the browser tab will indicate upload progress +**protip:** if you enable `favicon` in the `[⚙️] settings` tab (by typing something into the textbox), the icon in the browser tab will indicate upload progress -- also, the `[🔔]` and/or `[🔊]` switches enable visible and/or audible notifications on upload completion the up2k UI is the epitome of polished inutitive experiences: * "parallel uploads" specifies how many chunks to upload at the same time @@ -713,6 +715,7 @@ note: * the parser can finally handle `c,e2dsa,e2tsr` so you no longer have to `c,e2dsa:c,e2tsr` * `e2tsr` is probably always overkill, since `e2ds`/`e2dsa` would pick up any file modifications and `e2ts` would then reindex those, unless there is a new copyparty version with new parsers and the release note says otherwise * the rescan button in the admin panel has no effect unless the volume has `-e2ds` or higher +* deduplication is possible on windows if you run copyparty as administrator (not saying you should!) ### exclude-patterns diff --git a/copyparty/__main__.py b/copyparty/__main__.py index ba76c83d..2439f698 100755 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -38,10 +38,10 @@ from .util import ( ) try: + from collections.abc import Callable from types import FrameType from typing import Any, Optional - from collections.abc import Callable except: pass diff --git a/copyparty/broker_mpw.py b/copyparty/broker_mpw.py index 51eb51df..1cea46b8 100644 --- a/copyparty/broker_mpw.py +++ b/copyparty/broker_mpw.py @@ -2,11 +2,11 @@ from __future__ import print_function, unicode_literals import argparse +import os import signal import sys import threading -import os import queue from .authsrv import AuthSrv diff --git a/copyparty/broker_util.py b/copyparty/broker_util.py index d74a622a..2705e7d2 100644 --- a/copyparty/broker_util.py +++ b/copyparty/broker_util.py @@ -8,7 +8,7 @@ from queue import Queue from .__init__ import TYPE_CHECKING from .authsrv import AuthSrv -from .util import Pebkac, HMaccas +from .util import HMaccas, Pebkac try: from typing import Any, Optional, Union diff --git a/copyparty/mtag.py b/copyparty/mtag.py index 61176127..5812ddec 100644 --- a/copyparty/mtag.py +++ b/copyparty/mtag.py @@ -8,7 +8,7 @@ import shutil import subprocess as sp import sys -from .__init__ import E, PY2, WINDOWS, unicode +from .__init__ import PY2, WINDOWS, E, unicode from .bos import bos from .util import REKOBO_LKEY, fsenc, min_ex, retchk, runcmd, uncyg diff --git a/copyparty/util.py b/copyparty/util.py index 0b5e9288..86063d28 100644 --- a/copyparty/util.py +++ b/copyparty/util.py @@ -72,10 +72,10 @@ except: pass if TYPE_CHECKING: - from .authsrv import VFS - import magic + from .authsrv import VFS + FAKE_MP = False try: diff --git a/docs/changelog.md b/docs/changelog.md index e36a9c06..d63228d1 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,23 @@ +▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ +# 2022-0818-1724 `v1.3.16` gc kiting + +* read-only demo server at https://a.ocv.me/pub/demo/ +* latest gzip edition of the sfx: [v1.0.14](https://github.com/9001/copyparty/releases/tag/v1.0.14#:~:text=release-specific%20notes) + +## bugfixes +* found a janky workaround for [the remaining chrome wasm gc bug](https://bugs.chromium.org/p/chromium/issues/detail?id=1354816) + * worker-global typedarray holding on to the first and last byte of the filereader output while wasm chews on it + * overhead is small enough, slows down firefox by 2~3% + * seems to work on many chrome versions but no guarantees + * still OOM's some 93 and 97 betas, probably way more + +## other changes +* disable `mt` by default on https-desktop-chrome + * avoids the gc bug entirely (except for plaintext-http and phones) + * chrome [doesn't parallelize](https://bugs.chromium.org/p/chromium/issues/detail?id=1352210) `crypto.subtle.digest` anyways + + + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ # 2022-0817-2302 `v1.3.15` pls let me stop finding chrome bugs diff --git a/scripts/deps-docker/Dockerfile b/scripts/deps-docker/Dockerfile index f2784da0..19512ca0 100644 --- a/scripts/deps-docker/Dockerfile +++ b/scripts/deps-docker/Dockerfile @@ -1,10 +1,10 @@ -FROM alpine:3.16 +FROM alpine:3 WORKDIR /z ENV ver_asmcrypto=5b994303a9d3e27e0915f72a10b6c2c51535a4dc \ ver_hashwasm=4.9.0 \ ver_marked=4.0.18 \ - ver_mde=2.16.1 \ - ver_codemirror=5.65.7 \ + ver_mde=2.18.0 \ + ver_codemirror=5.65.9 \ ver_fontawesome=5.13.0 \ ver_zopfli=1.0.3 @@ -17,7 +17,7 @@ RUN mkdir -p /z/dist/no-pk \ && wget https://github.com/openpgpjs/asmcrypto.js/archive/$ver_asmcrypto.tar.gz -O asmcrypto.tgz \ && wget https://github.com/markedjs/marked/archive/v$ver_marked.tar.gz -O marked.tgz \ && wget https://github.com/Ionaru/easy-markdown-editor/archive/$ver_mde.tar.gz -O mde.tgz \ - && wget https://github.com/codemirror/CodeMirror/archive/$ver_codemirror.tar.gz -O codemirror.tgz \ + && wget https://github.com/codemirror/codemirror5/archive/$ver_codemirror.tar.gz -O codemirror.tgz \ && wget https://github.com/FortAwesome/Font-Awesome/releases/download/$ver_fontawesome/fontawesome-free-$ver_fontawesome-web.zip -O fontawesome.zip \ && wget https://github.com/google/zopfli/archive/zopfli-$ver_zopfli.tar.gz -O zopfli.tgz \ && wget https://github.com/Daninet/hash-wasm/releases/download/v$ver_hashwasm/hash-wasm@$ver_hashwasm.zip -O hash-wasm.zip \