mirror of
https://github.com/9001/copyparty.git
synced 2025-11-02 04:53:15 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acc363133f | ||
|
|
8f2d502d4d | ||
|
|
2ae93ad715 | ||
|
|
bb590e364a |
@@ -1,6 +1,6 @@
|
||||
# Maintainer: icxes <dev.null@need.moe>
|
||||
pkgname=copyparty
|
||||
pkgver="1.9.8"
|
||||
pkgver="1.9.9"
|
||||
pkgrel=1
|
||||
pkgdesc="Portable file sharing hub"
|
||||
arch=("any")
|
||||
@@ -20,7 +20,7 @@ optdepends=("ffmpeg: thumbnails for videos, images (slower) and audio, music tag
|
||||
)
|
||||
source=("https://github.com/9001/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
|
||||
backup=("etc/${pkgname}.d/init" )
|
||||
sha256sums=("ae8510f02f0b52d6fec4a22e95dd739ccffc4c39eb86abfd5c5feb836860c366")
|
||||
sha256sums=("756bb13d136dcd8629a6449a9fcb6c3949ae499bcfb2b8efdb48e5b12c5c1ca1")
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"url": "https://github.com/9001/copyparty/releases/download/v1.9.8/copyparty-sfx.py",
|
||||
"version": "1.9.8",
|
||||
"hash": "sha256-j64rMm3znrfN3c+vpFQloEAyp8PVna67kzjpunk0byw="
|
||||
"url": "https://github.com/9001/copyparty/releases/download/v1.9.9/copyparty-sfx.py",
|
||||
"version": "1.9.9",
|
||||
"hash": "sha256-z8CvPYBwh8Nt0z/JtzKjJpVGul+rJ3zmWcqltUCnsdc="
|
||||
}
|
||||
@@ -1046,6 +1046,7 @@ def add_logging(ap):
|
||||
ap2.add_argument("--ansi", action="store_true", help="force colors; overrides environment-variable NO_COLOR")
|
||||
ap2.add_argument("--no-voldump", action="store_true", help="do not list volumes and permissions on startup")
|
||||
ap2.add_argument("--log-tdec", metavar="N", type=int, default=3, help="timestamp resolution / number of timestamp decimals")
|
||||
ap2.add_argument("--log-badpwd", metavar="N", type=int, default=1, help="log passphrase of failed login attempts: 0=terse, 1=plaintext, 2=hashed")
|
||||
ap2.add_argument("--log-conn", action="store_true", help="debug: print tcp-server msgs")
|
||||
ap2.add_argument("--log-htp", action="store_true", help="debug: print http-server threadpool scaling")
|
||||
ap2.add_argument("--ihead", metavar="HEADER", type=u, action='append', help="dump incoming header")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# coding: utf-8
|
||||
|
||||
VERSION = (1, 9, 9)
|
||||
VERSION = (1, 9, 10)
|
||||
CODENAME = "prometheable"
|
||||
BUILD_DT = (2023, 10, 8)
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import calendar
|
||||
import copy
|
||||
import errno
|
||||
import gzip
|
||||
import hashlib
|
||||
import itertools
|
||||
import json
|
||||
import os
|
||||
@@ -131,6 +132,7 @@ class HttpCli(object):
|
||||
self.mode = " "
|
||||
self.req = " "
|
||||
self.http_ver = " "
|
||||
self.hint = " "
|
||||
self.host = " "
|
||||
self.ua = " "
|
||||
self.is_rclone = False
|
||||
@@ -142,6 +144,7 @@ class HttpCli(object):
|
||||
self.rem = " "
|
||||
self.vpath = " "
|
||||
self.vpaths = " "
|
||||
self.trailing_slash = True
|
||||
self.uname = " "
|
||||
self.pw = " "
|
||||
self.rvol = [" "]
|
||||
@@ -159,22 +162,17 @@ class HttpCli(object):
|
||||
self.can_get = False
|
||||
self.can_upget = False
|
||||
self.can_admin = False
|
||||
self.out_headerlist: list[tuple[str, str]] = []
|
||||
self.out_headers: dict[str, str] = {}
|
||||
self.html_head = " "
|
||||
# post
|
||||
self.parser: Optional[MultipartParser] = None
|
||||
# end placeholders
|
||||
|
||||
self.bufsz = 1024 * 32
|
||||
self.hint = ""
|
||||
self.trailing_slash = True
|
||||
self.out_headerlist: list[tuple[str, str]] = []
|
||||
self.out_headers = {
|
||||
"Vary": "Origin, PW, Cookie",
|
||||
"Cache-Control": "no-store, max-age=0",
|
||||
}
|
||||
h = self.args.html_head
|
||||
if self.args.no_robots:
|
||||
h = META_NOBOTS + (("\n" + h) if h else "")
|
||||
self.out_headers["X-Robots-Tag"] = "noindex, nofollow"
|
||||
self.html_head = h
|
||||
|
||||
def log(self, msg: str, c: Union[int, str] = 0) -> None:
|
||||
@@ -227,6 +225,15 @@ class HttpCli(object):
|
||||
self.is_https = False
|
||||
self.headers = {}
|
||||
self.hint = ""
|
||||
self.uname = self.pw = " "
|
||||
|
||||
self.out_headerlist = []
|
||||
self.out_headers = {
|
||||
"Vary": "Origin, PW, Cookie",
|
||||
"Cache-Control": "no-store, max-age=0",
|
||||
}
|
||||
if self.args.no_robots:
|
||||
self.out_headers["X-Robots-Tag"] = "noindex, nofollow"
|
||||
|
||||
if self.is_banned():
|
||||
return False
|
||||
@@ -264,9 +271,9 @@ class HttpCli(object):
|
||||
h = {"WWW-Authenticate": 'Basic realm="a"'} if ex.code == 401 else {}
|
||||
try:
|
||||
self.loud_reply(unicode(ex), status=ex.code, headers=h, volsan=True)
|
||||
return self.keepalive
|
||||
except:
|
||||
return False
|
||||
pass
|
||||
return False
|
||||
|
||||
self.ua = self.headers.get("user-agent", "")
|
||||
self.is_rclone = self.ua.startswith("rclone/")
|
||||
@@ -2123,7 +2130,15 @@ class HttpCli(object):
|
||||
msg = "login ok"
|
||||
dur = int(60 * 60 * self.args.logout)
|
||||
else:
|
||||
self.log("invalid password: {}".format(pwd), 3)
|
||||
logpwd = pwd
|
||||
if self.args.log_badpwd == 0:
|
||||
logpwd = ""
|
||||
elif self.args.log_badpwd == 2:
|
||||
zb = hashlib.sha512(pwd.encode("utf-8", "replace")).digest()
|
||||
logpwd = "%" + base64.b64encode(zb[:12]).decode("utf-8")
|
||||
|
||||
self.log("invalid password: {}".format(logpwd), 3)
|
||||
|
||||
g = self.conn.hsrv.gpwd
|
||||
if g.lim:
|
||||
bonk, ip = g.bonk(self.ip, pwd)
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
|
||||
# 2023-1007-2229 `v1.9.9` fix cross-volume dedup moves
|
||||
|
||||
## bugfixes
|
||||
* v1.6.2 introduced a bug which, when moving files between volumes, could cause the move operation to abort when it encounters a deduplicated file
|
||||
|
||||
|
||||
|
||||
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
|
||||
# 2023-1006-1750 `v1.9.8` static filekeys
|
||||
|
||||
|
||||
Reference in New Issue
Block a user