Commit Graph

12 Commits

Author SHA1 Message Date
wx-11-ot
aa0338a1c4 feat: secure direct download links - only show for password-free shares
SECURITY: Fix potential password bypass vulnerability by:

Frontend changes:
- Add password_hash field to Share interface
- Only show direct download button for single files without password protection
- Update hasDownloadLink() to check both file type and password status

Backend changes:
- Remove token-based authentication bypass for password-protected shares
- Enforce password authentication for all protected shares, even with valid tokens
- Add security comments explaining the rationale

This ensures that password-protected shares cannot be accessed via direct
download links, closing the security vulnerability while preserving the
convenience of direct downloads for public shares.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-07 20:49:55 +08:00
wx-11-ot
49203f7599 feat: restore direct download link button in share dialog
Add back the missing direct download link button that was removed.
This button allows users to copy a direct download URL for shared files,
which is different from the share page URL.

Changes:
- Add direct download link button with content_paste_go icon
- Import pub API for download URL generation
- Add hasDownloadLink() method to check if file can be directly downloaded
- Add buildDownloadLink() method to generate direct download URLs
- Only show button for single file selections (not directories)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-07 20:49:49 +08:00
Henrique Dias
2b5d6cbb99 fix: mitigate unprotected shares 2025-06-29 16:06:20 +02:00
kloon15
0201f9c5c4
refactor: Fix eslint warnings (#3698)
* Update dependencies and remove typescript version pinning (fixed upstream)

* Fix esling warnings (disabled any and script lang checks)
Rewrote clipboard copy (Fixes #3407)
Run prettier

---------

Co-authored-by: Oleg Lobanov <oleg@lobanov.me>
2025-01-30 10:18:48 +01:00
kloon15
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
Shlomo
883383a571
fix: moment locale (#2952) 2024-01-30 10:16:32 +01:00
Yeicor
a4ef02a47b
feat: add option to copy download links from shares (#2442) 2023-05-01 13:07:01 +02:00
Ramires Viana
9734f707f0 chore: refactor url creation 2022-05-02 13:47:22 +00:00
Oleg Lobanov
c44b37c50c
chore: add prettier frontent linter 2021-03-21 12:51:58 +01:00
Ramires Viana
1819377897 feat: improved sharing prompt 2021-02-16 15:39:11 +00:00
Alvaro Aleman
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
Henrique Dias
7414ca10b3 chore: move files to frontend 2019-05-21 11:13:59 +01:00