From 9b218f219062fedf4ff318ebe966da10e8421f79 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Sun, 6 Nov 2022 17:24:33 -0500 Subject: [PATCH] URL encode password in JDBC connection string (#4527) --- resources/scripts/components/server/databases/DatabaseRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/scripts/components/server/databases/DatabaseRow.tsx b/resources/scripts/components/server/databases/DatabaseRow.tsx index 1b486959e..9d2c05a73 100644 --- a/resources/scripts/components/server/databases/DatabaseRow.tsx +++ b/resources/scripts/components/server/databases/DatabaseRow.tsx @@ -35,7 +35,7 @@ export default ({ database, className }: Props) => { const removeDatabase = ServerContext.useStoreActions((actions) => actions.databases.removeDatabase); const jdbcConnectionString = `jdbc:mysql://${database.username}${ - database.password ? `:${database.password}` : '' + database.password ? `:${encodeURIComponent(database.password)}` : '' }@${database.connectionString}/${database.name}`; const schema = object().shape({