Skip to content

Commit d66c612

Browse files
come-ncsusnux
authored andcommitted
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>
1 parent a20c497 commit d66c612

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/App/AppManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,6 @@ public function isBackendRequired(string $backend): bool {
943943
*/
944944
public function cleanAppId(string $app): string {
945945
/* Only lowercase alphanumeric is allowed */
946-
return preg_replace('/[^a-z0-9_]+/', '', $app);
946+
return preg_replace('/(^[0-9_]|[^a-z0-9_]+|_$)/', '', $app);
947947
}
948948
}

0 commit comments

Comments
 (0)