release(v3.5.2): relax username validation + stdClass namespace fix

- users(core): allow dots/@ in usernames and block "." / ".." to prevent path-like edge cases
- php(core): namespace stdClass return to \stdClass for consistency under FileRise\Domain
- admin: update sponsor list (add Stefan)
This commit is contained in:
Ryan
2026-02-26 11:25:54 -05:00
committed by GitHub
parent 9c847315c0
commit 245cfde6a5
4 changed files with 30 additions and 3 deletions
+26
View File
@@ -1,5 +1,31 @@
# Changelog
## Changes 02/26/2026 (v3.5.2)
`release(v3.5.2): relax username validation + stdClass namespace fix`
**Commit message**
```text
release(v3.5.2): relax username validation + stdClass namespace fix
- users(core): allow dots/@ in usernames and block "." / ".." to prevent path-like edge cases
- php(core): namespace stdClass return to \stdClass for consistency under FileRise\Domain
- admin: update sponsor list (add Stefan)
```
**Changed**
- **Username validation**
- Updated `REGEX_USER` to allow `.` and `@` in usernames (and spaces/underscores/dashes as before).
- Added a negative lookahead to reject `.` and `..` as standalone usernames.
- **PHP namespace correctness**
- `UserModel::getUserPermissions()` now returns `\stdClass` (global) instead of `stdClass` to avoid namespace resolution issues under `FileRise\Domain`.
- **Admin sponsor page**
- Added “Stefan” to the sponsors list in `public/js/adminSponsor.js`.
---
## Changes 02/19/2026 (v3.5.1)
`release(v3.5.1): authenticated Link File deep links + shared file request mode`
+1 -1
View File
@@ -43,7 +43,7 @@ define('TOTAL_UPLOAD_SIZE','5G');
define('REGEX_FOLDER_NAME','/^(?!^(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])$)(?!.*[. ]$)(?:[^<>:"\/\\\\|?*\x00-\x1F]{1,255})(?:[\/\\\\][^<>:"\/\\\\|?*\x00-\x1F]{1,255})*$/xu');
define('PATTERN_FOLDER_NAME','[\p{L}\p{N}_\-\s\/\\\\]+');
define('REGEX_FILE_NAME', '/^[^\x00-\x1F\/\\\\]{1,255}$/u');
define('REGEX_USER', '/^[\p{L}\p{N}_\- ]+$/u');
define('REGEX_USER', '/^(?!\.{1,2}$)[\p{L}\p{N}_\- .@]+$/u');
define('FR_DEMO_MODE', false);
date_default_timezone_set(TIMEZONE);
+2 -1
View File
@@ -35,7 +35,8 @@ const DEFAULT_SUPPORTERS = [
'@jubnl',
'Juozaitis S',
'Cocoseb31',
'nulltrope'
'nulltrope',
'Stefan'
];
/**
+1 -1
View File
@@ -420,7 +420,7 @@ class UserModel
}
}
return new stdClass();
return new \stdClass();
}
/**