From 1a563ff5169e30835ae9433e01f5e7bf8151aab3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Thu, 13 Apr 2017 15:45:32 +0200 Subject: [PATCH] SONAR-9087 AlterColumnsBuilder must validate table name --- .../server/platform/db/migration/sql/AlterColumnsBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/sql/AlterColumnsBuilder.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/sql/AlterColumnsBuilder.java index 222fcc660eb..3471389aad6 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/sql/AlterColumnsBuilder.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/sql/AlterColumnsBuilder.java @@ -31,6 +31,7 @@ import org.sonar.server.platform.db.migration.def.ColumnDef; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.Lists.newArrayList; +import static org.sonar.server.platform.db.migration.def.Validations.validateTableName; /** * Generate SQL queries to update multiple columns of a single table. @@ -52,7 +53,7 @@ public class AlterColumnsBuilder { public AlterColumnsBuilder(Dialect dialect, String tableName) { this.dialect = dialect; - this.tableName = tableName; + this.tableName = validateTableName(tableName); } public AlterColumnsBuilder updateColumn(ColumnDef columnDef) { -- 2.39.5