From ee3333362f8a7432739bece816b5c6f6b2dd4abb Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 11 Nov 2023 17:38:43 +0000 Subject: [PATCH] v1.9.17 --- CONTRIBUTING.md | 2 +- copyparty/__version__.py | 4 ++-- copyparty/authsrv.py | 2 +- copyparty/ftpd.py | 5 ----- copyparty/httpcli.py | 4 ++-- copyparty/svchub.py | 8 ++++---- docs/changelog.md | 36 ++++++++++++++++++++++++++++++++++++ tests/util.py | 3 ++- 8 files changed, 48 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 11b7502d..43466993 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ aside from documentation and ideas, some other things that would be cool to have * **docker improvements** -- I don't really know what I'm doing when it comes to containers, so I'm sure there's a *huge* room for improvement here, mainly regarding how you're supposed to use the container with kubernetes / docker-compose / any of the other popular ways to do things. At some point I swear I'll start learning about docker so I can pick up clach04's [docker-compose draft](https://github.com/9001/copyparty/issues/38) and learn how that stuff ticks, unless someone beats me to it! -* **packaging** for various linux distributions -- this could either be as simple as just plopping the sfx.py in the right place and calling that from systemd (the [archlinux package](https://github.com/9001/copyparty/pull/18) originally did this); maybe with a small config-file which would cause copyparty to load settings from `/etc/copyparty.d` (like the [archlinux package](https://github.com/9001/copyparty/tree/hovudstraum/contrib/package/arch) does; copyparty.conf), or it could be a proper installation of the copyparty python package into /usr/lib or similar (the archlinux package [eventually went for this approach](https://github.com/9001/copyparty/pull/26) eventually) +* **packaging** for various linux distributions -- this could either be as simple as just plopping the sfx.py in the right place and calling that from systemd (the archlinux package [originally did this](https://github.com/9001/copyparty/pull/18)); maybe with a small config-file which would cause copyparty to load settings from `/etc/copyparty.d` (like the [archlinux package](https://github.com/9001/copyparty/tree/hovudstraum/contrib/package/arch) does with `copyparty.conf`), or it could be a proper installation of the copyparty python package into /usr/lib or similar (the archlinux package [eventually went for this approach](https://github.com/9001/copyparty/pull/26)) * [fpm](https://github.com/jordansissel/fpm) can probably help with the technical part of it, but someone needs to handle distro relations :-) diff --git a/copyparty/__version__.py b/copyparty/__version__.py index 8f2de2ea..96b5bce4 100644 --- a/copyparty/__version__.py +++ b/copyparty/__version__.py @@ -1,8 +1,8 @@ # coding: utf-8 -VERSION = (1, 9, 16) +VERSION = (1, 9, 17) CODENAME = "prometheable" -BUILD_DT = (2023, 11, 4) +BUILD_DT = (2023, 11, 11) S_VERSION = ".".join(map(str, VERSION)) S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT) diff --git a/copyparty/authsrv.py b/copyparty/authsrv.py index 2c8f23d8..61799ff5 100644 --- a/copyparty/authsrv.py +++ b/copyparty/authsrv.py @@ -21,9 +21,9 @@ from .util import ( META_NOBOTS, SQLITE_VER, UNPLICATIONS, + UTC, ODict, Pebkac, - UTC, absreal, afsenc, get_df, diff --git a/copyparty/ftpd.py b/copyparty/ftpd.py index 15f84264..0f85ce8b 100644 --- a/copyparty/ftpd.py +++ b/copyparty/ftpd.py @@ -11,11 +11,6 @@ import time from .__init__ import ANYWIN, PY2, TYPE_CHECKING, E -try: - import asynchat -except: - sys.path.append(os.path.join(E.mod, "vend")) - from pyftpdlib.authorizers import AuthenticationFailed, DummyAuthorizer from pyftpdlib.filesystems import AbstractedFS, FilesystemError from pyftpdlib.handlers import FTPHandler diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 127ff5f4..9bb35cc5 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -37,13 +37,13 @@ from .star import StreamTar from .sutil import StreamArc, gfilter from .szip import StreamZip from .util import ( - Garda, HTTPCODE, META_NOBOTS, + UTC, + Garda, MultipartParser, ODict, Pebkac, - UTC, UnrecvEOF, absreal, alltrace, diff --git a/copyparty/svchub.py b/copyparty/svchub.py index 2fce9c67..e2f6905d 100644 --- a/copyparty/svchub.py +++ b/copyparty/svchub.py @@ -36,17 +36,17 @@ from .tcpsrv import TcpSrv from .th_srv import HAVE_PIL, HAVE_VIPS, HAVE_WEBP, ThumbSrv from .up2k import Up2k from .util import ( - FFMPEG_URL, - VERSIONS, - Daemon, DEF_EXP, DEF_MTE, DEF_MTH, + FFMPEG_URL, + UTC, + VERSIONS, + Daemon, Garda, HLog, HMaccas, ODict, - UTC, alltrace, ansi_re, min_ex, diff --git a/docs/changelog.md b/docs/changelog.md index 76e7a4a7..62065155 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,39 @@ +▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ +# 2023-1104-2158 `v1.9.16` windedup + +## breaking changes +* two of the prometheus metrics have changed slightly; see the [breaking changes readme section](https://github.com/9001/copyparty#breaking-changes) + * (i'm not familiar with prometheus so i'm not sure if this is a big deal) + +## new features +* #58 versioned docker images! no longer just `latest` +* browser: the mkdir feature now accepts `foo/bar/qux` and `../foo` and `/bar` +* add 14 more prometheus metrics; see [readme](https://github.com/9001/copyparty#prometheus) for details + * connections, requests, malicious requests, volume state, file hashing/analyzation queues +* catch some more malicious requests in the autoban filters + * some malicious requests are now answered with HTTP 422, so that they count against `--ban-422` + +## bugfixes +* windows: fix symlink-based upload deduplication + * MS decided to make symlinks relative to working-directory rather than destination-path... +* `--stats` would produce invalid metrics if a volume was offline +* minor improvements to password hashing ux: + * properly warn if `--ah-cli` or `--ah-gen` is used without `--ah-alg` + * support `^D` during `--ah-cli` +* browser-ux / cosmetics: + * fix toast/tooltip colors on splashpage + * easier to do partial text selection inside links (search results, breadcrumbs, uploads) + * more rclone-related hints on the connect-page + +## other changes +* malformed http headers from clients are no longer included in the client error-message + * just in case there are deployments with a reverse-proxy inserting interesting stuff on the way in + * the serverlog still contains all the necessary info to debug your own clients +* updated [example nginx config](https://github.com/9001/copyparty/blob/hovudstraum/contrib/nginx/copyparty.conf) to recover faster from brief server outages + * the default value of `fail_timeout` (10sec) makes nginx cache the outage for longer than necessary + + + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ # 2023-1024-1643 `v1.9.15` expand placeholder diff --git a/tests/util.py b/tests/util.py index 3d3683db..d3f7ae91 100644 --- a/tests/util.py +++ b/tests/util.py @@ -115,7 +115,7 @@ class Cfg(Namespace): ex = "dotpart no_rescan no_sendfile no_voldump plain_ip" ka.update(**{k: True for k in ex.split()}) - ex = "css_browser hist js_browser no_forget no_hash no_idx nonsus_urls" + ex = "ah_cli ah_gen css_browser hist js_browser no_forget no_hash no_idx nonsus_urls" ka.update(**{k: None for k in ex.split()}) ex = "s_thead s_tbody th_convt" @@ -190,6 +190,7 @@ class VHttpSrv(object): self.broker = NullBroker() self.prism = None self.bans = {} + self.nreq = 0 aliases = ["splash", "browser", "browser2", "msg", "md", "mde"] self.j2 = {x: J2_FILES for x in aliases}