mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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:
parent
8f57a50767
commit
6e7c97ea1f
1 changed files with 1 additions and 1 deletions
|
|
@ -956,6 +956,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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue