copyparty 1.16.4__py3-none-any.whl → 1.16.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
copyparty/__main__.py CHANGED
@@ -1075,7 +1075,7 @@ def add_cert(ap, cert_path):
1075
1075
  def add_auth(ap):
1076
1076
  ses_db = os.path.join(E.cfg, "sessions.db")
1077
1077
  ap2 = ap.add_argument_group('IdP / identity provider / user authentication options')
1078
- ap2.add_argument("--idp-h-usr", metavar="HN", type=u, default="", help="bypass the copyparty authentication checks and assume the request-header \033[33mHN\033[0m contains the username of the requesting user (for use with authentik/oauth/...)\n\033[1;31mWARNING:\033[0m if you enable this, make sure clients are unable to specify this header themselves; must be washed away and replaced by a reverse-proxy")
1078
+ ap2.add_argument("--idp-h-usr", metavar="HN", type=u, default="", help="bypass the copyparty authentication checks if the request-header \033[33mHN\033[0m contains a username to associate the request with (for use with authentik/oauth/...)\n\033[1;31mWARNING:\033[0m if you enable this, make sure clients are unable to specify this header themselves; must be washed away and replaced by a reverse-proxy")
1079
1079
  ap2.add_argument("--idp-h-grp", metavar="HN", type=u, default="", help="assume the request-header \033[33mHN\033[0m contains the groupname of the requesting user; can be referenced in config files for group-based access control")
1080
1080
  ap2.add_argument("--idp-h-key", metavar="HN", type=u, default="", help="optional but recommended safeguard; your reverse-proxy will insert a secret header named \033[33mHN\033[0m into all requests, and the other IdP headers will be ignored if this header is not present")
1081
1081
  ap2.add_argument("--idp-gsep", metavar="RE", type=u, default="|:;+,", help="if there are multiple groups in \033[33m--idp-h-grp\033[0m, they are separated by one of the characters in \033[33mRE\033[0m")
@@ -1729,7 +1729,7 @@ def main(argv = None) :
1729
1729
  except:
1730
1730
  lprint("\nfailed to disable quick-edit-mode:\n" + min_ex() + "\n")
1731
1731
 
1732
- if al.ansi:
1732
+ if not al.ansi:
1733
1733
  al.wintitle = ""
1734
1734
 
1735
1735
  # propagate implications
copyparty/__version__.py CHANGED
@@ -1,8 +1,8 @@
1
1
  # coding: utf-8
2
2
 
3
- VERSION = (1, 16, 4)
3
+ VERSION = (1, 16, 5)
4
4
  CODENAME = "COPYparty"
5
- BUILD_DT = (2024, 12, 7)
5
+ BUILD_DT = (2024, 12, 11)
6
6
 
7
7
  S_VERSION = ".".join(map(str, VERSION))
8
8
  S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)
copyparty/httpcli.py CHANGED
@@ -537,8 +537,14 @@ class HttpCli(object):
537
537
  except:
538
538
  pass
539
539
 
540
+ self.pw = uparam.get("pw") or self.headers.get("pw") or bauth or cookie_pw
541
+ self.uname = (
542
+ self.asrv.sesa.get(self.pw)
543
+ or self.asrv.iacct.get(self.asrv.ah.hash(self.pw))
544
+ or "*"
545
+ )
546
+
540
547
  if self.args.idp_h_usr:
541
- self.pw = ""
542
548
  idp_usr = self.headers.get(self.args.idp_h_usr) or ""
543
549
  if idp_usr:
544
550
  idp_grp = (
@@ -583,20 +589,11 @@ class HttpCli(object):
583
589
  idp_grp = ""
584
590
 
585
591
  if idp_usr in self.asrv.vfs.aread:
592
+ self.pw = ""
586
593
  self.uname = idp_usr
587
594
  self.html_head += "<script>var is_idp=1</script>\n"
588
595
  else:
589
596
  self.log("unknown username: [%s]" % (idp_usr), 1)
590
- self.uname = "*"
591
- else:
592
- self.uname = "*"
593
- else:
594
- self.pw = uparam.get("pw") or self.headers.get("pw") or bauth or cookie_pw
595
- self.uname = (
596
- self.asrv.sesa.get(self.pw)
597
- or self.asrv.iacct.get(self.asrv.ah.hash(self.pw))
598
- or "*"
599
- )
600
597
 
601
598
  if self.args.ipu and self.uname == "*":
602
599
  self.uname = self.conn.ipu_iu[self.conn.ipu_nm.map(self.ip)]
copyparty/tcpsrv.py CHANGED
@@ -399,17 +399,17 @@ class TcpSrv(object):
399
399
  if not netdevs:
400
400
  continue
401
401
 
402
- added = "nothing"
403
- removed = "nothing"
402
+ add = []
403
+ rem = []
404
404
  for k, v in netdevs.items():
405
405
  if k not in self.netdevs:
406
- added = "{} = {}".format(k, v)
406
+ add.append("\n added %s = %s" % (k, v))
407
407
  for k, v in self.netdevs.items():
408
408
  if k not in netdevs:
409
- removed = "{} = {}".format(k, v)
409
+ rem.append("\nremoved %s = %s" % (k, v))
410
410
 
411
- t = "network change detected:\n added {}\033[0;33m\nremoved {}"
412
- self.log("tcpsrv", t.format(added, removed), 3)
411
+ t = "network change detected:\033[32m%s\033[33m%s"
412
+ self.log("tcpsrv", t % ("".join(add), "".join(rem)), 3)
413
413
  self.netdevs = netdevs
414
414
  self._distribute_netdevs()
415
415
 
Binary file
copyparty/web/svcs.html CHANGED
@@ -53,7 +53,6 @@
53
53
  {% if s %}
54
54
  <li>running <code>rclone mount</code> on LAN (or just dont have valid certificates)? add <code>--no-check-certificate</code></li>
55
55
  {% endif %}
56
- <li>running <code>rclone mount</code> as root? add <code>--allow-other</code></li>
57
56
  <li>old version of rclone? replace all <code>=</code> with <code>&nbsp;</code> (space)</li>
58
57
  </ul>
59
58
 
@@ -137,7 +136,6 @@
137
136
  {% if args.ftps %}
138
137
  <li>running on LAN (or just dont have valid certificates)? add <code>no_check_certificate=true</code> to the config command</li>
139
138
  {% endif %}
140
- <li>running <code>rclone mount</code> as root? add <code>--allow-other</code></li>
141
139
  <li>old version of rclone? replace all <code>=</code> with <code>&nbsp;</code> (space)</li>
142
140
  </ul>
143
141
  <p>if you want to use the native FTP client in windows instead (please dont), press <code>win+R</code> and run this command:</p>
copyparty/web/up2k.js.gz CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: copyparty
3
- Version: 1.16.4
3
+ Version: 1.16.5
4
4
  Summary: Portable file server with accelerated resumable uploads, deduplication, WebDAV, FTP, zeroconf, media indexer, video thumbnails, audio transcoding, and write-only folders
5
5
  Author-email: ed <copyparty@ocv.me>
6
6
  License: MIT
@@ -394,6 +394,9 @@ same order here too
394
394
 
395
395
  * [Chrome issue 1352210](https://bugs.chromium.org/p/chromium/issues/detail?id=1352210) -- plaintext http may be faster at filehashing than https (but also extremely CPU-intensive)
396
396
 
397
+ * [Chrome issue 383568268](https://issues.chromium.org/issues/383568268) -- filereaders in webworkers can OOM / crash the browser-tab
398
+ * copyparty has a workaround which seems to work well enough
399
+
397
400
  * [Firefox issue 1790500](https://bugzilla.mozilla.org/show_bug.cgi?id=1790500) -- entire browser can crash after uploading ~4000 small files
398
401
 
399
402
  * Android: music playback randomly stops due to [battery usage settings](#fix-unreliable-playback-on-android)
@@ -1543,7 +1546,9 @@ replace copyparty passwords with oauth and such
1543
1546
 
1544
1547
  you can disable the built-in password-based login system, and instead replace it with a separate piece of software (an identity provider) which will then handle authenticating / authorizing of users; this makes it possible to login with passkeys / fido2 / webauthn / yubikey / ldap / active directory / oauth / many other single-sign-on contraptions
1545
1548
 
1546
- a popular choice is [Authelia](https://www.authelia.com/) (config-file based), another one is [authentik](https://goauthentik.io/) (GUI-based, more complex)
1549
+ * the regular config-defined users will be used as a fallback for requests which don't include a valid (trusted) IdP username header
1550
+
1551
+ some popular identity providers are [Authelia](https://www.authelia.com/) (config-file based) and [authentik](https://goauthentik.io/) (GUI-based, more complex)
1547
1552
 
1548
1553
  there is a [docker-compose example](./docs/examples/docker/idp-authelia-traefik) which is hopefully a good starting point (alternatively see [./docs/idp.md](./docs/idp.md) if you're the DIY type)
1549
1554
 
@@ -1,6 +1,6 @@
1
1
  copyparty/__init__.py,sha256=iRCNvMPg6k9WG_O2uCtlkD4vWogH8EgP9elp9XwSIJs,2610
2
- copyparty/__main__.py,sha256=fA4D0yAs6twyBcawN9lM7CtHuFagTsQloljWX9MZ1j0,113240
3
- copyparty/__version__.py,sha256=PSHPFmB4WReQ90GVjo2tS3ZE1I6F3Z2igIEoAOtf4ZQ,251
2
+ copyparty/__main__.py,sha256=QMgJweEFGzSHpKE54CcJe2sIHwwa8Kf3NRQqch58h0Q,113241
3
+ copyparty/__version__.py,sha256=qn_oNmlkJlFLhCQtoyBt5ojEXnzjKAyGucJ0Y9SRkSU,252
4
4
  copyparty/authsrv.py,sha256=CIK5OKl38LehdAt4hidCMpsATdJhPABJPkJStpQpp9U,103405
5
5
  copyparty/broker_mp.py,sha256=QdOXXvV2Xn6J0CysEqyY3GZbqxQMyWnTpnba-a5lMc0,4987
6
6
  copyparty/broker_mpw.py,sha256=PpSS4SK3pItlpfD8OwVr3QmJEPKlUgaf2nuMOozixgU,3347
@@ -11,7 +11,7 @@ copyparty/cfg.py,sha256=UUmFpFbTm750Nv9RnofS80-FTpWT37EggEtmkE1wbxE,10374
11
11
  copyparty/dxml.py,sha256=lZpg-kn-kQsXRtNY1n6fRaS-b7uXzMCyv8ovKnhZcZc,1548
12
12
  copyparty/fsutil.py,sha256=5CshJWO7CflfaRRNOb3JxghUH7W5rmS_HWNmKfx42MM,4538
13
13
  copyparty/ftpd.py,sha256=T97SFS7JFtvRLbJX8C4fJSYwe13vhN3-E6emtlVmqLA,17608
14
- copyparty/httpcli.py,sha256=hwHJ8EwV30MHZ6hGPGfmCuow5Nu2daMV2EN7Ups5jb8,207704
14
+ copyparty/httpcli.py,sha256=DRE8V3YxUk7YIBGSnmuH0px1ZSqtJciY15k1Rk8ThBI,207587
15
15
  copyparty/httpconn.py,sha256=mQSgljh0Q-jyWjF4tQLrHbRKRe9WKl19kGqsGMsJpWo,6880
16
16
  copyparty/httpsrv.py,sha256=PXLZlT6iuJZYG9ajNsAaNgRK3UtS4CrOGFGXOpkRtOk,18235
17
17
  copyparty/ico.py,sha256=eWSxEae4wOCfheHl-m-wchYvFRAR_97kJDb4NGaB-Z8,3561
@@ -26,7 +26,7 @@ copyparty/star.py,sha256=tV5BbX6AiQ7N4UU8DYtSTckNYeoeey4DBqq4LjfymbY,3818
26
26
  copyparty/sutil.py,sha256=JTMrQwcWH85hXB_cKG206eDZ967WZDGaP00AWvl_gB0,3214
27
27
  copyparty/svchub.py,sha256=sAHkiPGzzKACLqKlem2V-bps9Xh-wHlcfwaNywxcd5A,40877
28
28
  copyparty/szip.py,sha256=HFtnwOiBgx0HMLUf-h_T84zSlRijPxmhRo5PM613kRA,8602
29
- copyparty/tcpsrv.py,sha256=VuW_aVDcyXIhIMZ8I-wpIouX8MI9TGp7KKSRohrMTtk,19897
29
+ copyparty/tcpsrv.py,sha256=H7z9tzYRCm-kZwktnm_wP-v2MXaIOygx9yfdk1xkqRo,19889
30
30
  copyparty/tftpd.py,sha256=FRCALO3PigoBlwUrqxoKHM_xk7wT2O0GPG1TvNRtjOY,13606
31
31
  copyparty/th_cli.py,sha256=o6FMkerYvAXS455z3DUossVztu_nzFlYSQhs6qN6Jt8,4636
32
32
  copyparty/th_srv.py,sha256=LBcB4LpsF-H7L52Z0Dhn9LogRjJVPp1GKa8MeIMIBnw,29596
@@ -77,10 +77,10 @@ copyparty/web/shares.js.gz,sha256=emeY2-wjkh8x1JgaW6ny5fcC7XpZzZzfE1f-sEyntQ4,94
77
77
  copyparty/web/splash.css.gz,sha256=VxFqPvNdZtWb0u1C_GW2yYwrHq0lqPMitft9GYcv56k,1087
78
78
  copyparty/web/splash.html,sha256=wc8El8_5BR3EMuVik8WYAkkEQ4S6-VepR1B1F8qAYgI,6190
79
79
  copyparty/web/splash.js.gz,sha256=EEfsi9YGtPTYRB6MPX8Dfg4YyfqncI9ldJS7_MGVOhs,2710
80
- copyparty/web/svcs.html,sha256=P5YZimYLeQMT0uz6u3clQSNZRc5Zs0Ok-ffcbcGSYuc,11762
80
+ copyparty/web/svcs.html,sha256=5cAp6RAkvqfDAbO9kxuDgXcmuDH20ZN2fse0uzCXb5s,11564
81
81
  copyparty/web/svcs.js.gz,sha256=k81ZvZ3I-f4fMHKrNGGOgOlvXnCBz0mVjD-8mieoWCA,520
82
82
  copyparty/web/ui.css.gz,sha256=v8U-1tetZzuzTpITjq8NWj1gg3jEiYDIIE8aE0dx63k,2800
83
- copyparty/web/up2k.js.gz,sha256=vB3hLpRZzVStcN2-NAGjFdfroxFPbFvKss4vxVYyy1c,23371
83
+ copyparty/web/up2k.js.gz,sha256=0keU0ljh9B41VsoVMpi-NtuYjtGl00xUgNH20CIbz8Y,23449
84
84
  copyparty/web/util.js.gz,sha256=MMDIZbxzBwBYE5eYLzhGGpC7h257oEFZaBKZwJ4uhc8,15077
85
85
  copyparty/web/w.hash.js.gz,sha256=l3GpSJD6mcU-1CRWkIj7PybgbjlfSr8oeO3vortIrQk,1105
86
86
  copyparty/web/a/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -97,7 +97,7 @@ copyparty/web/deps/busy.mp3.gz,sha256=EVphk1_HYyRKJmtpeK99vbAstF7ub1f9ndu020H8PQ
97
97
  copyparty/web/deps/easymde.css.gz,sha256=vWxfueI64rPikuqFj69wJBtGisqf93AheQtOZqgUI_c,3041
98
98
  copyparty/web/deps/easymde.js.gz,sha256=rHBs4XWQe2bmv7ZzDIk43oxnTwrwpq5laYHhV5sKQQo,77014
99
99
  copyparty/web/deps/fuse.py,sha256=6j4Zy3VpQg629pwwIW77v2LJ1hy-qlyrxwhXfKl9B7I,33426
100
- copyparty/web/deps/marked.js.gz,sha256=3sviQ05gVpZF2s43evtFQZZSMSHV6K3OsS15OoBqb10,22610
100
+ copyparty/web/deps/marked.js.gz,sha256=nay9sv1hlF9Y6ngXuXvE_O-MaTa7vE5OyK05-jjWx7M,22617
101
101
  copyparty/web/deps/mini-fa.css.gz,sha256=CTPrNaH8OTVmxajrGP88E2MkjadY9_81TBVnd9sw9Y8,572
102
102
  copyparty/web/deps/mini-fa.woff,sha256=L9DNncV2TIyvsrspMbJouvnnt7F068Hbn7YZYvN76AU,2784
103
103
  copyparty/web/deps/prism.css.gz,sha256=Z_A6rJ3MN5KWnjvXaV787aTW_5DT-xjFd0YZ7_W-Krk,1468
@@ -106,9 +106,9 @@ copyparty/web/deps/prismd.css.gz,sha256=ObUlksQVr-OuYlTz-I4B23TeBg2QDVVGRnWBz8cV
106
106
  copyparty/web/deps/scp.woff2,sha256=w99BDU5i8MukkMEL-iW0YO9H4vFFZSPWxbkH70ytaAg,8612
107
107
  copyparty/web/deps/sha512.ac.js.gz,sha256=lFZaCLumgWxrvEuDr4bqdKHsqjX82AbVAb7_F45Yk88,7033
108
108
  copyparty/web/deps/sha512.hw.js.gz,sha256=UAed2_ocklZCnIzcSYz2h4P1ycztlCLj-ewsRTud2lU,7939
109
- copyparty-1.16.4.dist-info/LICENSE,sha256=gOr4h33pCsBEg9uIy9AYmb7qlocL4V9t2uPJS5wllr0,1072
110
- copyparty-1.16.4.dist-info/METADATA,sha256=yo6iBPRZrSl4VBK6h32czwBccoFewYTRoSFVaOOYr5s,140656
111
- copyparty-1.16.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
112
- copyparty-1.16.4.dist-info/entry_points.txt,sha256=4zw6a3rqASywQomiYLObjjlxybaI65LYYOTJwgKz7b0,128
113
- copyparty-1.16.4.dist-info/top_level.txt,sha256=LnYUPsDyk-8kFgM6YJLG4h820DQekn81cObKSu9g-sI,10
114
- copyparty-1.16.4.dist-info/RECORD,,
109
+ copyparty-1.16.5.dist-info/LICENSE,sha256=gOr4h33pCsBEg9uIy9AYmb7qlocL4V9t2uPJS5wllr0,1072
110
+ copyparty-1.16.5.dist-info/METADATA,sha256=GZhzGQ_TCgJ9upH18-bjepyQPkFI5pK7EL64w7SWSD0,140992
111
+ copyparty-1.16.5.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
112
+ copyparty-1.16.5.dist-info/entry_points.txt,sha256=4zw6a3rqASywQomiYLObjjlxybaI65LYYOTJwgKz7b0,128
113
+ copyparty-1.16.5.dist-info/top_level.txt,sha256=LnYUPsDyk-8kFgM6YJLG4h820DQekn81cObKSu9g-sI,10
114
+ copyparty-1.16.5.dist-info/RECORD,,