fix: Also remove digits at the start and underscore on both ends of appid

Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
This commit is contained in:
Côme Chilliet 2025-02-13 16:22:21 +01:00 committed by Andy Scherzinger
parent adf5b72939
commit a9ad23e3d8

View file

@ -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);
}
}