mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-05-07 10:06:09 +02:00
Prevent execution of empty SQL strings during database import (#2664)
Co-authored-by: Naoki Takezoe <takezoe@gmail.com>
This commit is contained in:
@@ -83,7 +83,9 @@ object JDBCUtil {
|
||||
}
|
||||
if (c == ';' && !stringLiteral) {
|
||||
val sql = new String(out.toByteArray, "UTF-8")
|
||||
conn.update(sql.trim)
|
||||
if (sql != null && !sql.isEmpty()) {
|
||||
conn.update(sql.trim)
|
||||
}
|
||||
out = new ByteArrayOutputStream()
|
||||
} else {
|
||||
out.write(c)
|
||||
|
||||
Reference in New Issue
Block a user