175 Commits
Author SHA1 Message Date
Nicola Murino 87fb508c97 update js and css deps
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-09-19 10:00:07 +02:00
Nicola Murino f9857a181c dataprovider: refuse self-service writes made from a stale snapshot
A user or admin changing its own password, profile or two-factor
settings wrote the whole account back and could overwrite a concurrent
administrator change. Self-service updates are now conditional on the
stored updated_at matching the value read, and every update stores a
strictly increasing updated_at.

Thanks to Thomas Toth for the report.

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-09-07 08:47:18 +02:00
Nicola Murino b4698f1f4d dataprovider: refuse to delete referenced folders, roles and groups
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-08-24 18:27:56 +02:00
Nicola Murino 8f079955bb ftpd: refactor TLS requirement
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-08-12 20:59:48 +02:00
Nicola Murino 40e97113a1 httpd: return the same response for password reset requests that send no code
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-08-12 20:45:48 +02:00
Nicola Murino 6cce58233c virtual folders: add subpath support
A virtual folder mapping can now re-root the mount onto a sub-path of
the folder: the mount at the virtual path serves the folder starting
from the configured subpath, which stays invisible in the virtual tree.
The same folder can be mapped multiple times with distinct subpaths;
quota remains a property of the whole folder, so every mapping must use
the same limits.

Supported for local, encrypted, S3, GCS, Azure Blob and SFTP folders.

Fixes #2037

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-07-18 16:19:43 +02:00
Nicola Murino 1c93729b40 vfs: normalize cloud key prefix on save
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-06-11 18:45:34 +02:00
Nicola Murino 2b5e510875 openapi: clarify speed limits and max sessions
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-06-08 13:09:26 +02:00
Nicola Murino c07bfd7689 update js and css deps
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-05-30 19:30:33 +02:00
Nicola Murino 5e51495634 httpd: always download share and user files as attachments
The `inline` query parameter on the browsable-share file download
and on the authenticated user file download suppressed the
`Content-Disposition: attachment` header. A file placed in a share
or user home (for example an HTML document) could then be served
inline as `text/html` and execute in SFTPGo's web origin,
allowing stored XSS through a shared link.

These endpoints now always respond with `Content-Disposition:
attachment`. The `inline` parameter is removed from the API and from
the OpenAPI schema: it dates back to a time when the WebClient had no
built-in viewers, and the current web client previews images, video,
PDF and other files directly within shares through its own viewer
endpoints, so the flag is obsolete.

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-05-30 13:28:35 +02:00
Nicola Murino 3f90231394 admins: restrict 2FA reset on other admins to super-admins
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-05-25 12:59:53 +02:00
Nicola Murino 02e312f39c fs: enforce a configurable minimum entropy for data-encryption secrets
The CryptFs passphrase and the S3 SSE-C key are used directly as
data-at-rest encryption key material, yet they were accepted with no
strength check, so an operator could protect encrypted data with a
trivially guessable secret.

Add common.secret_min_entropy (default 80): when one of these
secrets is submitted in plain text it must pass a minimum-entropy
check before it is encrypted and stored. The check runs on
plain-text input, so secrets that are already stored keep working even
if the threshold is later raised. The estimate is a heuristic used to
reject obviously weak input, not a measure of cryptographic strength:
always supply key material generated by a CSPRNG.

Thanks to Vishal Shukla (@shukla304) for the report.

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-05-18 19:46:19 +02:00
Nicola Murino 4bf1090bd3 transfers: count per-host transfer limit per client IP, not per user
Fixes #2237

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-05-18 18:00:42 +02:00
Nicola Murino 35d9242466 update css and js
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2026-02-08 09:15:17 +01:00
Nicola Murino 29c635a9a6 update version and deps
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2025-10-23 18:26:44 +02:00
Nicola Murino 35525e22e9 remove rsync support
rsync was executed as an external command, which means we have no insight
into or control over what it actually does.
From a security perspective, this is far from ideal.

To be clear, there's nothing inherently wrong with rsync itself. However,
if we were to support it properly within SFTPGo, we would need to implement
the low-level protocol internally rather than relying on launching an external
process. This would ensure it works seamlessly with any storage backend,
just as SFTP does, for example.
We recommend using one of the many alternatives that rely on the SFTP
protocol, such as rclone

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2025-09-28 18:15:15 +02:00
Nicola Murino a469dd68a2 update theme and js deps
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2025-09-22 09:15:57 +02:00
Nicola Murino 7317674b41 Remove legacy data retention API
Data retention is now managed via the EventManager, introduced in v2.4.0.
This allows scheduling retention checks and sending email or HTTP notifications,
making the old API redundant.

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2025-07-12 22:20:54 +02:00
Nicola Murino c9d361d93b OpenAPI: add missing event statuses to rule condition options
Fixes #2011

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2025-07-03 11:44:06 +02:00
Nicola Murino 4c5d9f3a25 OpenAPI: fix logs endpoint
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2025-06-21 09:45:29 +02:00
Nicola Murino 312902b5f5 update js deps
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2025-03-16 12:26:08 +01:00
Nicola Murino 83cfcde9cb OpenAPI: add email format to user's additional emails
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2025-02-16 18:02:45 +01:00
Nicola Murino f30d6ad82a update css and js deps
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-11-10 12:34:10 +01:00
Nicola Murino 3dd412f6e3 WebAdmin and REST API: remove too granular permissions
Our permissions system for admin users is too granular and some
permissions overlap. For example, you can define an administrator
with the "manage_system" permission and not with the "manage_admins"
or "manage_user" permission, but the "manage_system" permission
allows you to restore a backup and then create users and
administrators. The following permissions will be removed:
"manage_admins", "manage_apikeys", "manage_system", "retention_checks",
"manage_event_rules", "manage_roles", "manage_ip_lists". Now you
need to add the "*" permission to replace the removed granular
permissions because the removed permissions allow actions that
should only be allowed to super administrators.
There is no point in having separate, overlapping permissions.

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-11-10 10:46:28 +01:00
Nicola Murino 0c75d234b9 OpenAPI: document password_strength
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-10-26 21:19:28 +02:00
Nicola Murino 7feeec6941 update OpenAPI schema
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-10-16 20:51:51 +02:00
Nicola Murino 2fbf608895 S3: add SSE customer key
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-08-15 10:09:06 +02:00
Nicola Murino 81433e00d1 event action: add update modtime to fs rename
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-08-09 20:18:33 +02:00
Nicola Murino 9daf0ba767 update swagger UI to 5.17.14
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-06-18 20:47:39 +02:00
Nicola Murino 0cddcba5a7 EventManager: add an action to rotate the log file
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-06-04 19:51:52 +02:00
Nicola Murino 2bd3b46e3f update swagger ui
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-05-25 16:14:42 +02:00
Nicola Murino 61bc0065f9 back to development
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-05-16 04:54:46 +02:00
Nicola Murino 19e9857fea set version to 2.6.0
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-05-15 17:36:10 +02:00
Nicola Murino a1af33c6aa WebClient: allow to set TLS certificates
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-05-03 18:30:03 +02:00
Nicola MurinoandNazarii Mediukh 58a8b2b860 S3: add support for STS temporary credentials
Fixes #1558

Co-authored-by: Nazarii Mediukh <nazar.medykh@gmail.com>
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-05-02 20:01:30 +02:00
Nicola Murino de62be6f21 update swagger ui
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-05-02 19:01:32 +02:00
Nicola Murino acfd4c3e55 ftpd: allow to ignore ASCII transfer types
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-05-02 19:00:29 +02:00
Nicola Murino 456517af87 notifier plugin: add support for login succeeded events
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-04-10 18:39:08 +02:00
Nicola Murino cb3bc3f604 update OpenAPI definition
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-03-18 19:32:01 +01:00
Nicola Murino 4d357a6a57 EventManager: allow to check for inactive users
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-03-04 19:48:10 +01:00
Nicola Murino a577d8b3cd WebAdmin: allow to disable 2FA
Before it was only possible using REST API

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-02-23 18:24:07 +01:00
Nicola Murino de089e51fd Web: allow to require password change and two-factor for admins
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-02-21 20:45:10 +01:00
Nicola Murino 51ae2d7301 add copy permission
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-02-20 18:19:09 +01:00
Nicola Murino e61fb42cbc remove metadata plugin
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-02-17 12:30:47 +01:00
Nicola Murino d939a82225 user: add TLS certificates
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2024-01-14 21:36:23 +01:00
Nicola Murino ac309cf9a3 WebClient: remove data schema usage from mfa page
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2023-11-18 20:06:31 +01:00
Nicola Murino c5c5860012 ssh: allow to configure public key auth algorithms
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2023-11-09 20:03:04 +01:00
Nicola Murino 5452c3c121 update swagger ui
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2023-11-05 17:29:06 +01:00
Nicola Murino f05fe78737 ssh: refactor host key algorithm restriction
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2023-10-07 16:07:19 +02:00
Nicola Murino 6c482a248d portable mode: add WebClient
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2023-08-10 19:02:55 +02:00