Commit Graph
10 Commits
Author SHA1 Message Date
robert dennis 838b154168 validation cleanup 2026-10-12 05:18:56 -04:00
robert dennis b362df4c5f api key actions 2026-10-12 05:18:56 -04:00
Sky Mulley ff9527a2e9 fix tests to pass 2026-10-08 09:54:19 +01:00
Sandip Ghimire bb4e89826e fix(security): harden path validation, session revocation, and request handling (#7255)
# Security, Validation & Session Improvements

## Changes

* **Hardened IP/CIDR validation**
* Properly handles invalid IP addresses and CIDR ranges during API key
creation.
* Invalid IP/CIDR data now fails safely instead of causing a 500 error.

* **Improved reCAPTCHA error handling**
  * Handles network and verification failures gracefully.
  * Fixed undefined result notices and removed duplicate checks.

* **Added file permission activity logging**
* File permission (`chmod`) changes are now recorded in the activity
log.

* **Removed duplicate 2FA middleware**
* Cleaned up duplicate `RequireTwoFactorAuthentication` registration
from API routes.

* **Improved session revocation on password changes**
  * Password changes now invalidate other active sessions.
* Rotates the `remember_token` and removes stale database sessions where
applicable.
* Applies consistently across password resets and user password changes.

* **Reduced unnecessary public storage access**
* Disabled automatic public storage routes for the local filesystem disk
to reduce the attack surface.

* **Hardened file manager request validation**
  * Added strict validation for file permission modes.
  * Fixed optional `root` validation rules.
  * Added length limits for file paths, roots, and file/folder names.

* **Hardened mount source and target path validation**
* Prevents path traversal and subpath-based bypasses in mount source and
target validation.
  * Handles trailing slashes and normalized paths correctly.
* Prevents mounts from targeting protected subdirectories, such as
another server's volume directory.
2026-10-07 12:39:12 -04:00
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00
DaneEveritt 7224ca81de Fix bug preventing the creation of API keys with CIDR ranges 2022-06-18 14:21:20 -04:00
Dane Everitt c449ca5155 Use more standardized phpcs 2021-01-23 12:33:34 -08:00
Dane Everitt 1f7fe093ae Correctly validate description for API keys to match model expectations; closes #2457 2020-10-10 17:15:30 -07:00
Dane Everitt d41b86f0ea Correctly pass along allowed IPs for client API keys, closes #2244 2020-08-17 19:48:51 -07:00
Dane Everitt 933a4733e8 Add base support for creating a new API key for an account 2020-03-22 18:15:38 -07:00