diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2025-02-13 16:22:21 +0100 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2025-02-19 18:39:20 +0100 |
commit | a9ad23e3d8ffa974c34d5312ee2f1ccba3adc1ff (patch) | |
tree | fdb924e5b7d52082af5ae0dde8b97eeb8b34cd66 /lib/private/App | |
parent | adf5b729395e0a6c1f779665c5da11a6d0d88fbf (diff) | |
download | nextcloud-server-backport/50794/stable31.tar.gz nextcloud-server-backport/50794/stable31.zip |
fix: Also remove digits at the start and underscore on both ends of appidbackport/50794/stable31
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Diffstat (limited to 'lib/private/App')
-rw-r--r-- | lib/private/App/AppManager.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index 3f2e31f08ee..12282af0873 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -943,6 +943,6 @@ class AppManager implements IAppManager { */ public function cleanAppId(string $app): string { /* Only lowercase alphanumeric is allowed */ - return preg_replace('/[^a-z0-9_]+/', '', $app); + return preg_replace('/(^[0-9_]|[^a-z0-9_]+|_$)/', '', $app); } } |