Skip to content

Commit a9ad23e

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 <[email protected]> Signed-off-by: Côme Chilliet <[email protected]>
1 parent adf5b72 commit a9ad23e

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)