Skip to content

Commit

Permalink
fix: Also remove digits at the start and underscore on both ends of a…
Browse files Browse the repository at this point in the history
…ppid

Co-authored-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc and susnux authored Feb 13, 2025
1 parent 8f57a50 commit 6e7c97e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/App/AppManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,6 @@ public function isBackendRequired(string $backend): bool {
*/
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);
}
}

0 comments on commit 6e7c97e

Please sign in to comment.