From 7ea48d2cfc16530e6ea5207be74711930100f7b6 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 21 Oct 2022 21:07:26 -0300 Subject: [PATCH] addslashes Signed-off-by: Vitor Mattos --- lib/private/Setup/PostgreSQL.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php index 9d0e1dc412fd9..af816c7ad0432 100644 --- a/lib/private/Setup/PostgreSQL.php +++ b/lib/private/Setup/PostgreSQL.php @@ -79,7 +79,7 @@ public function setupDatabase($username) { // Therefore we assume that the database is only used by one user/service which is Nextcloud // Additional services should get installed in a separate database in order to stay secure // Also see https://www.postgresql.org/docs/15/ddl-schemas.html#DDL-SCHEMAS-PATTERNS - $connectionMainDatabase->executeQuery('GRANT CREATE ON SCHEMA public TO ' . $this->dbUser); + $connectionMainDatabase->executeQuery('GRANT CREATE ON SCHEMA public TO ' . addslashes($this->dbUser)); $connectionMainDatabase->close(); }