51 Commits
Author SHA1 Message Date
Henrique Dias a1063925e1 fix: restore symlink behavior as opt-in followExternalSymlinks 2026-06-23 13:19:51 +02:00
Henrique Dias 64511ce45e fix: dangling symlink, write, delete scope bugs 2026-06-23 12:35:55 +02:00
yfzhouandGitHub 403d2bbd33 fix: restore ScopedFs RealPath (#5986) 2026-06-13 07:17:48 +02:00
Henrique Dias 7c2c0a11b3 refactor: ScopedFs to avoid escaping symlinks 2026-06-07 18:16:46 +02:00
Henrique Dias 3406d3d7f9 fix: recursive check 2026-06-07 17:12:31 +02:00
Puneet DixitandGitHub 7b7ff8ae8f fix: skip inaccessible children when listing directories (#5958) 2026-06-04 12:49:07 +02:00
Henrique Dias 3471ec2c4b fix: incomplete fix for symlinked directories let scopes users and public-share recipients read and write files outside of scope 2026-06-04 11:02:18 +02:00
Henrique Dias 6b04cbf5e9 fix: allow writes when user scope resolves to filesystem root
WithinScope compared targets against root+separator, which produced
"//" when the scope resolved to "/". No path matched, so every write
was rejected with os.ErrPermission (HTTP 403), breaking saves and
uploads for root-scoped installs. Skip the appended separator when root
already ends in one.
2026-06-03 15:40:26 +02:00
Henrique DiasandClaude Opus 4.8 847d08bdd1 fix: address three security disclosures (archive traversal, login DoS, symlink escape)
- http/raw.go: strip Windows backslash separators from archive entry names
  on any host. filepath.ToSlash is a no-op for "\" on Linux, so a stored
  backslash filename was emitted verbatim and could escape the extraction
  directory on Windows extractors (zip-slip). (GHSA-gxjx-7m74-hcq8)

- http/auth.go: cap the login and signup request bodies with
  http.MaxBytesReader (1 MiB). The JSON decoder previously read an
  arbitrarily large password into memory before bcrypt truncated it,
  enabling unauthenticated memory-exhaustion DoS. (GHSA-w5fm-68j4-fpc4)

- files/file.go, http/resource.go: add files.WithinScope and refuse to
  follow a symlink whose on-disk target escapes the user's scoped root,
  on both the read path (stat) and the write path (writeFile). Prevents a
  scoped user from reading/overwriting/sharing files outside their scope
  via a pre-existing escaping symlink. (GHSA-239w-m3h6-ch8v)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 11:21:00 +02:00
Ariel LeyvaandGitHub a2d80c62c1 feat: add "disable image resolution calculation" flag (#5638) 2025-12-29 08:25:49 +01:00
Henrique DiasandGitHub f029c3005e refactor: cleanup package names (#5605) 2025-12-06 10:52:11 +01:00
Henrique Dias 23c4e4565b chore: remove 'nolint' comments 2025-11-15 09:01:21 +01:00
Vincent LeeandHenrique Dias 21ad653b7e feat: Allow file and directory creation modes to be configured
The defaults remain the same as before.
For now, the config options are global instead of per-user.
Note also that the BoltDB creation maintains the old default mode of 0640
since it's not really a user-facing filesystem manipulation.
Fixes #5316, #5200
2025-07-22 07:56:52 +02:00
Henrique DiasandGitHub 089255997a fix: do not expose the name of the root directory (#5224) 2025-06-28 08:40:07 +02:00
Henrique Dias ae4fb0ea25 chore: make as exception to mnd 2025-06-27 08:19:34 +02:00
Henrique Dias 8b8fb3343f ci: remove goconst 2025-06-27 08:03:11 +02:00
Oleksandr RedkoandHenrique Dias 1d494ff315 build: bump golangci-lint to 2.1.6 2025-06-27 07:56:15 +02:00
Henrique DiasandGitHub ca86f91621 Merge commit from fork 2025-06-25 17:42:39 +02:00
Andreas DeiningerandGitHub d729701bd4 chore: fix typos (#3490) 2024-09-23 11:55:07 +02:00
Enzo HamelinandGitHub f6f7e5fea3 feat: support mime type for epub extension (#3425) 2024-08-29 22:45:05 +02:00
古大羊andGitHub be62f56782 feat: Enhance MIME Type Detection for Additional File Extensions (#3183) 2024-05-03 19:59:45 +02:00
Oleg Lobanov ae0af1f996 chore: fix golangci-lint errors 2024-04-01 18:24:06 +02:00
5100e587d7 feat: migrate to vue 3 (#2689)
---------

Co-authored-by: Joep <jcbuhre@gmail.com>
Co-authored-by: Omar Hussein <omarmohammad1951@gmail.com>
Co-authored-by: Oleg Lobanov <oleg@lobanov.me>
2024-04-01 17:18:22 +02:00
ねらひかだandGitHub 5c5ab6b875 fix: files and directories are created with the correct permissions (#2966) 2024-01-30 10:12:38 +01:00
a09dfa8d9f feat: display image resolutions in file details (#2830)
---------

Co-authored-by: MAERYO <maeryo@hanwha.com>
2023-11-25 13:35:00 +01:00
古大羊andGitHub 374bbd3ec1 perf(backend): optimize subtitles detection performance (#2637) 2023-08-26 14:53:18 +02:00
Oleg Lobanov efd41cc4c1 build(backend): upgrade golangci-lint to v1.53.3 2023-07-31 12:51:00 +02:00
M A E R Y OandGitHub 912f27a9e3 fix: add directory creation code to partial upload handler (#2575) (#2580) 2023-07-31 12:38:11 +02:00
Tobias GoerkeandGitHub 7b35815754 feat: integrate tus.io for resumable and chunked uploads (#2145) 2023-07-28 18:15:44 +02:00
Oleg Lobanov 10d628aecc chore: upgrade golangci-lint to 1.51.1 2023-02-16 09:19:44 +01:00
Ramires Viana b14b9114f8 feat: invalid symlink icon 2022-05-05 15:14:40 +00:00
Oleg Lobanov c1987237d0 feat: use real image path to calculate cache key 2022-02-21 19:59:22 +01:00
niubility000andGitHub 949f0f277f fix: open all the pdf files correctly (#1742) 2022-01-10 17:01:21 +01:00
Mazen BesherandGitHub c2e03bbfab feat: detect multiple subtitle languages (#1723) 2021-12-21 00:07:43 +01:00
Oleg Lobanov 76b466f649 fix: check symlink target type (closes #1488) 2021-08-04 11:44:02 +02:00
Oleg Lobanov 8650d2ffe7 fix: failure on broken symlink deletion 2021-07-26 13:02:11 +02:00
Oleg Lobanov 34d7d2c8c4 chore: upgrade golangci-lint 2021-07-26 12:00:05 +02:00
Ramires Viana 209f9fa77f fix: omit file content 2021-04-23 12:04:02 +00:00
Ramires Viana e9baf0c4b6 fix: empty text file on editor 2021-03-23 18:18:02 +00:00
Ramires Viana eeadc532fe fix: text file detection on editor 2021-03-17 18:06:56 +00:00
Oleg LobanovandGitHub 23f84642e6 build: use make for building the project (#1304) 2021-03-04 00:10:08 +01:00
Alvaro AlemanandGitHub d8f415f8ab feat: allow to password protect shares (#1252)
This changes allows to password protect shares. It works by:
* Allowing to optionally pass a password when creating a share
* If set, the password + salt that is configured via a new flag will be
  hashed via bcrypt and the hash stored together with the rest of the
  share
* Additionally, a random 96 byte long token gets generated and stored
  as part of the share
* When the backend retrieves an unauthenticated request for a share that
  has authentication configured, it will return a http 401
* The frontend detects this and will show a login prompt
* The actual download links are protected via an url arg that contains
  the previously generated token. This allows us to avoid buffering the
  download in the browser and allows pasting the link without breaking
  it
2021-03-02 12:00:18 +01:00
WeidiDengandGitHub 6914063853 feat: allow disabling file detections by reading header (#1175) 2021-01-07 11:30:17 +01:00
Oleg Lobanov 586d198d47 fix: fix hanging when reading a named pipe file (closes #1155) 2020-11-24 11:37:31 +01:00
Oleg LobanovandGitHub 700f32718e refactor: add more go linters (#970) 2020-06-01 01:12:36 +02:00
Ramires VianaandHenrique Dias cc7ec4f0c5 Fix multiple selection 2020-01-09 17:24:30 +00:00
荒野無燈 586bb63ee7 fixup func isBinary to handle CJK runes correctly
Former-commit-id: 880817e9e688f7126eb5e3010f5fc37110b28448 [formerly d44d541d75c625a474ca7c8f9adcc52e20ee69e0] [formerly fbbaf7b6a31ed09944700f1ffa98c0baca9ae0f3 [formerly 1c42539522]]
Former-commit-id: 2a647332f2d80741f7ac9cd4eccffbf8a0dd5348 [formerly ef7355350d4d1276911bcdd8b4aaaf1b82efe50c]
Former-commit-id: 7c6d116b6bda492cc9544dc4a46d95cd225c1b39
2019-05-08 02:15:37 +08:00
Alexei YuzhakovandHenrique Dias e86dfbe8ff fix: case dependency and sorting order (#661) (#662)
Former-commit-id: a772b30907a92818e5c109adc0d382af7ddf40dc [formerly 589c237e7f1230f16970c0b68263d4174dbe98f6] [formerly c3a0e4964d028dc06e5076869dd92975eb3c4699 [formerly 17b514510b]]
Former-commit-id: 8e2c49d8fc18df68bb3172fbb98a97c98a5eb818 [formerly bc396cbf040a5016a26cd5387b14e9f55f8b74c6]
Former-commit-id: bda1997f4292c213e907ed0d8e566c5ab931edb9
2019-02-03 15:50:08 +01:00
Henrique DiasandGitHub f2d952bf0e fix: dont fail when can't detect file type (#609)
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
Former-commit-id: 3dbe943b6d64bf7d3f6c6d8970d2608438e4c2bc [formerly d5238a25f0e31dee84367a5e27b6f68ab50050d6] [formerly 297d8be6b3aa5e5411634286ba4faff256fd6837 [formerly 07f3ee38e5]]
Former-commit-id: 5a568c9eff47b5fa54d3956ecc2d2a55cb31fc8f [formerly 8d7f78cbf47a8a84f02324fdd858782e4b67b0e0]
Former-commit-id: 1343ba84d9c8952bd9e210cf7f23b70129236c81
2019-01-06 12:59:53 +00:00
Henrique Dias 3890a9a416 fix: do not read whole file on listings
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>

Former-commit-id: c630ed523a9f599c3dd1eda5930baa020d0b9911 [formerly f89f524d2979e43d6c2fd99903552bfe89addbc1] [formerly ba05ce7e5c730a04681910d87378dcdf3acc809b [formerly 28b326ab1d]]
Former-commit-id: cc4832f376eb2e5d5c99dfdac9b1966448b4e48f [formerly f254f221fa44f016a8f22cb3414580bb3a57750b]
Former-commit-id: 66c66d82ade69e62d32e05f8350166b2cdc3bb12
2019-01-06 09:24:09 +00:00