Commit graph

638 commits

Author SHA1 Message Date
ed 0b6d2d2424 safari: workaround another apple bug (closes #1111);
seemingly as of iOS / macos 26.1, safari started requesting
favicons -- specifically only favicons -- with the incorrect
browser context (they probably forgot to initialize something)

instead of the correct user-agent, it would send:
* iOS: NetworkingExtension/8623.1.14.10.9
* macos: com.apple.WebKit.Networking/21623.1.14.11.9

further, it would NOT send any SameSite=Strict cookies,
which the session-cookie is (for good reason)

putting these two together, safari now looks like a webdav client,
and copyparty sends the only appropriate response (http 401),
resulting in a basic-authentication popup

left with no good options, this is what we can do to mitigate:

* add a new option --ua-nodav which is a regex of user-agents
   which are definitely not webdav clients, as macos-finder still
   flipflops between WebDAVLib/1.3 and WebDAVFS/3.0.0 like normal

* use the "js=y" cookie as another flag that this is a webbrowser

merry christmas
2025-12-16 22:38:51 +00:00
ed 9c64788d43 add x-forwarded-proto fallback (closes #1110);
some reverseproxies do not include a compatible alternative to
x-forwarded-proto by default, while also lacking the option to
set custom headers

add --xf-proto-fb to set a fixed protocol to assume
2025-12-16 21:15:44 +00:00
ed 5e1d9a58d8 simplify idp-groups with spaces 2025-12-16 21:07:09 +00:00
ed 336842192c add --ipar (reverseproxy-capable ipa); closes #1109 2025-12-16 20:38:37 +00:00
ed 3bc0bf19b0 cache-control volflag; closes #964 2025-12-14 18:28:53 +00:00
ed 5e85e3d628 rss: title/description templating; closes #1047
also closes #1053, a PR which inspired this commit heavily
(slightly different approach for flexibility and performance)

Co-authored-by: Dawson Jeane <dawsonmjeane@gmail.com>
2025-12-14 00:06:54 +00:00
ed 965a4a6949 logging: date format; closes #1049 2025-12-13 22:35:55 +00:00
ed 14bef85b87 custom logue/md names; closes #1068, closes #1089 2025-12-13 22:05:29 +00:00
ed ba017f7b53 only use fs-legal chars in names (closes #1010);
uploading a folder named COMPLE:X into exfat on linux would fail
because exfat behaves like windows, rejecting <>:|?*"\/

this would also fail on windows, but then due to
sanitize_fn being overly aggressive

fix this by detecting filesystem traits on startup and
also translating vpath early on windows
2025-12-13 19:44:56 +00:00
ed a1cbac0252 option to set thumbnail quality (#1092);
plus these fixes:

* adds a previously missed libvips optimization,
   giving much smaller files at the same quality

* try to align the quality-scale of each backend
   (pillow, libvips, ffmpeg) by filesize
2025-12-12 07:51:01 +00:00
ed ce2eeba226 custom ban-message 2025-12-11 21:38:36 +00:00
ed ad45de9441 enforce x-forwarded-host when reverse-proxied;
if x-forwarded-for is present, then also require
x-forwarded-host and x-forwarded-proto

avoids displaying subtly-incorrect values on the connect-page
and instead shows blatantly-incorrect values ("example.com")

the headernames x-forwarded-host and x-forwarded-proto can
be configured with global-options xf-host and xf-proto
2025-12-11 21:32:43 +00:00
ed a9174e5dee ui-option to force-download files (closes #1058);
* button "dl" in settings UI (always takes precedence)
* global-option and/or volflag "dlni"
* url-parameter ?dlni or ?dlni=0

the preference is applied per-volume when navigating between folders,
unless the settings-button has been toggled, which overrides that
2025-12-01 19:02:03 +00:00
ed 889bd3242a hooks: retcode 100, zmq json;
hooks returning exitcode 0 will:
* run the next hook, if any
* allow the original action, unless successive hook opposes

hooks returning exitcode 100 will:
* abort running successive hooks
* allow the original action

hooks returning anything other than 0 or 100 will:
* abort running successive hooks
* REJECT the original action

zmq can now respond with json; a dict with "rc", "rejectmsg",
"reloc" and so on, just like other hooks replying with json
2025-11-30 19:29:09 +00:00
ed b427d7802a metrics: allow list of users 2025-11-20 00:37:36 +09:00
ed cad15fbf60 warn against changing -j 2025-11-19 23:26:19 +09:00
ed a325353b1b option to default-disable tooltips; closes #937 2025-10-25 00:39:37 +00:00
ed 51e6099c58 add --versionb; closes #933 2025-10-17 22:30:14 +00:00
ed 98da5cc509 ui-elements can be hidden (#928) 2025-10-17 16:29:55 +00:00
ed b4fda5f1d6 subtract users/groups from access; closes #845 2025-10-17 00:01:54 +00:00
AppleTheGolden 1eb016c975
fix --accounts typo in --help-auth (#931) 2025-10-17 01:14:20 +02:00
ed f55d8341f1 new flag nodupem: reject dupes on move; closes #742 2025-10-14 22:51:48 +00:00
ed 6f02812af1 disable bans according to perms; closes #911 2025-10-14 21:09:38 +00:00
ed 677fd8eef1 config for ?stack verbosity / access 2025-10-14 20:23:38 +00:00
AppleTheGolden 8ef6dda74b
view .cbz in browser (#916)
adds functionality to allow browsing .cbz directly in the browser, without downloading them and using a separate program. meant for quickly inspecting the contents, less so for reading.

adds two new api calls, ?zls and ?zget, which return a file listing of a zip file and a specific file in the archive, respectively.

uses the zipfile module, so no support for .cbr etc
2025-10-11 23:17:24 +00:00
ed 4542ad3c01 hook-flag to send input on stdin 2025-10-05 20:35:03 +00:00
ed 41ed559faa hooks: import-flag 2025-10-04 13:32:26 +00:00
ed fbe5fa582e helptext fix 2025-10-04 12:00:42 +00:00
ed 9b7f933b78 optimize --name-url (#884) 2025-10-04 10:45:17 +00:00
Lulu 38cc809822
Add --name-url option (#884)
Turns the server name into a hyperlink to a spefified URL

Can link back to homepage with `--name-url=/`, controlpanel with
`name-url="/?h"`, or external sites with `name-url="https://foo.bar/"`
2025-10-04 10:10:48 +00:00
ed 0f9a239078 allow favicon.png/gif (samsung-android) 2025-10-04 09:39:13 +00:00
ed fc2754cba5 option to delete .PARTIAL on expiration 2025-09-29 22:16:57 +00:00
ed 470b504843 raster favicons; closes #383, #473 2025-09-29 21:50:13 +00:00
ed 435db14798 pregen html_head when static 2025-09-29 21:47:53 +00:00
ed 234eddec90 filesize formats; closes #184 2025-09-28 01:14:00 +00:00
ed ec7418734d uds-only http/https; closes #855 2025-09-27 19:12:06 +00:00
ed a3d9506783 mdns: customize http/https ports (#855) 2025-09-27 19:11:15 +00:00
ed 57650a218f use reflinks (not hardlinks) in -ss; closes #858 2025-09-27 18:44:14 +00:00
ed e187df28f2 fix markdown-expand example 2025-09-26 23:50:19 +00:00
AppleTheGolden 6dbd9901b2
OPDS Support (#779)
* add OPDS support
* add `?opds` to devnotes.md
* send content-disposition for opds downloads
2025-09-22 19:34:34 +00:00
ed 1460fe97ac rotf timezone option; closes #802 2025-09-21 21:21:41 +00:00
ed 478f1c764e logging: limit/disable fs-indexing progress 2025-09-19 21:05:42 +00:00
ed 59a0122179 prevent upload into ramdisk;
tries to detect misconfigured docker environments, e.g. /w/foo is mapped
to a disk but /w/ itself isn't
2025-09-19 19:46:14 +00:00
ed 8b66874b85 be case-sensitive on windows/macos (closes #781);
on Windows and Macos, most filesystems are case-insensitive,
which can lead to dangerous situations

one example is when another program (not copyparty or its UI) wants to
rename a file from `Foo` to `foo`; the program will probably start by
checking if `foo` exists and then delete it, however this would match
`Foo` and confuse the program into deleting the wrong file

fix this by adding a VERY EXPENSIVE detector to prevent this,
by listing the parent folder and checking if the case matches

this check will auto-enable when a case-insensitive FS is detected on
startup, but option `casechk` (global or volflag) can override this
2025-09-14 23:39:46 +00:00
ed 3f45492725 fix --help on non-utf8 consoles 2025-09-13 20:59:00 +00:00
ed d7887f3d55 qr-code can optionally ignore -q;
new options --qr-stdout and --qr-stderr will always print the qr-code
into the console, even if copyparty is running in quiet mode (-q)

closes https://codeberg.org/9001/copyparty/issues/1
2025-09-13 20:14:50 +00:00
ed ecd18adc3c optional case-insensitive unicode search (#789);
made it default-disabled because it's a bit expensive
2025-09-13 19:48:08 +00:00
ed edafa1586a volflag to block sharing of a volume 2025-09-07 17:20:51 +00:00
ed 74821a38ad speed 2025-09-05 20:38:04 +00:00
ed 19a4c45389 rbac disk-info and --ver (closes #726);
options --du-who and --ver-who specifies who can see the disk-info
(disk-usage, disk-free) and server-version based on user permissions
2025-09-05 19:48:38 +00:00