From 315c0ea59c8fe73bc413e5a915d41b768f67e26f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 16 Sep 2025 14:53:57 +0200 Subject: [PATCH] fix: Allow hyphen in appid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s rare but exists for some apps not in the appstore. Also added unit tests for cleanAppId and fixed small issues with it. Signed-off-by: Côme Chilliet --- lib/private/App/AppManager.php | 13 +++++++------ tests/lib/App/AppManagerTest.php | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index 9778f7e3e9a..4007484566c 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -1,4 +1,5 @@ []^±_−÷×≠‰A', 'a-_'], + ]; + } + + /** + * @dataProvider dataCleanAppId + */ + public function testCleanAppId(string $inputString, string $appid): void { + $this->assertEquals($appid, $this->manager->cleanAppId($inputString)); + } }