Skip to content

Commit 13164b2

Browse files
authored
Merge pull request #2284 from sharmaakshay177/h2_version_update_to_resolve_sec_vul
H2 version update to resolve sec vul
2 parents 33d8028 + 1f48e51 commit 13164b2

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ lazy val catsVersion = "2.13.0"
77
lazy val catsEffectVersion = "3.6.3"
88
lazy val circeVersion = "0.14.14"
99
lazy val fs2Version = "3.12.0"
10-
lazy val h2Version = "1.4.200"
10+
lazy val h2Version = "2.3.232"
1111
lazy val hikariVersion = "6.3.2" // N.B. Hikari v4 introduces a breaking change via slf4j v2
1212
lazy val kindProjectorVersion = "0.11.2"
1313
lazy val mysqlVersion = "9.4.0"

modules/core/src/test/scala/doobie/issue/706.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class `706` extends munit.ScalaCheckSuite {
2424
)
2525

2626
val setup: ConnectionIO[Unit] =
27-
sql"CREATE TABLE IF NOT EXISTS test (value INTEGER)".update.run.void
27+
sql"CREATE TABLE IF NOT EXISTS test (test_value INTEGER)".update.run.void
2828

2929
def insert[F[_]: Foldable, A: Write](as: F[A]): ConnectionIO[Int] =
3030
Update[A]("INSERT INTO test VALUES (?)").updateMany(as)

modules/h2-circe/src/main/scala/doobie/h2/circe/Instances.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ object Instances {
2424
jdbcTarget = JdbcType.VarChar,
2525
put = (ps, n, a) => ps.setBytes(n, a),
2626
update = (rs, n, a) => rs.updateBytes(n, a),
27-
checkedVendorType = Some("VARCHAR")
27+
checkedVendorType = Some("CHARACTER VARYING")
2828
)
2929
.tcontramap { a =>
3030
a.noSpaces.getBytes(UTF_8)

modules/h2-circe/src/test/scala/doobie/h2/circe/H2JsonSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class H2JsonSuite extends CatsEffectSuite {
2222

2323
def inOut[A: Write: Read](col: String, a: A) =
2424
for {
25-
_ <- Update0(s"CREATE TEMPORARY TABLE TEST (value $col)", None).run
26-
a0 <- Update[A](s"INSERT INTO TEST VALUES (?)", None).withUniqueGeneratedKeys[A]("value")(a)
25+
_ <- Update0(s"CREATE TEMPORARY TABLE TEST (test_value $col)", None).run
26+
a0 <- Update[A](s"INSERT INTO TEST VALUES (?)", None).withUniqueGeneratedKeys[A]("test_value")(a)
2727
} yield a0
2828

2929
def testInOut[A](col: String, a: A, t: Transactor[IO])(implicit m: Get[A], p: Put[A]) = {

modules/refined/src/test/scala/doobie/refined/RefinedSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class RefinedSuite extends munit.CatsEffectSuite {
7878

7979
def insertOptionalPositiveInt(v: Option[PositiveInt]) = {
8080
val queryRes = for {
81-
_ <- Update0(s"CREATE LOCAL TEMPORARY TABLE TEST (value INT)", None).run
81+
_ <- Update0(s"CREATE LOCAL TEMPORARY TABLE TEST (int_value INT)", None).run
8282
_ <- sql"INSERT INTO TEST VALUES ($v)".update.run
8383
} yield ()
8484
queryRes.transact(xa).assert

modules/specs2/src/test/scala/doobie/specs2/beforeall.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ class beforeall extends Specification with IOChecker with BeforeAll {
1919
import cats.effect.unsafe.implicits.global
2020

2121
// Setup
22-
val initQ = sql"create table some_table (value varchar not null)".update
22+
val initQ = sql"create table some_table (test_value varchar not null)".update
2323

24-
val targetQ = sql"select value from some_table".query[String]
24+
val targetQ = sql"select test_value from some_table".query[String]
2525

2626
val transactor: Transactor[IO] = Transactor.fromDriverManager[IO](
2727
driver = "org.h2.Driver",

0 commit comments

Comments
 (0)