diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b9959cdb..e61e98b1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [7.0.4] - 2023-10-12 + +- Fixes user info from primary user id query +- Fixes `deviceIdHash` issue + ## [7.0.3] - 2023-10-11 - Fixes issue with duplicate cron task diff --git a/build.gradle b/build.gradle index 9cffeaf26..95c6d4ef4 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ compileTestJava { options.encoding = "UTF-8" } // } //} -version = "7.0.3" +version = "7.0.4" repositories { diff --git a/src/main/java/io/supertokens/inmemorydb/queries/GeneralQueries.java b/src/main/java/io/supertokens/inmemorydb/queries/GeneralQueries.java index 26b39e54b..c645f2f7a 100644 --- a/src/main/java/io/supertokens/inmemorydb/queries/GeneralQueries.java +++ b/src/main/java/io/supertokens/inmemorydb/queries/GeneralQueries.java @@ -1181,7 +1181,7 @@ private static List getPrimaryUserInfoForUserIds(Start start " WHERE au.primary_or_recipe_user_id IN (SELECT primary_or_recipe_user_id FROM " + getConfig(start).getAppIdToUserIdTable() + " WHERE (user_id IN (" + Utils.generateCommaSeperatedQuestionMarks(userIds.size()) + - ") OR au.primary_or_recipe_user_id IN (" + + ") OR primary_or_recipe_user_id IN (" + Utils.generateCommaSeperatedQuestionMarks(userIds.size()) + ")) AND app_id = ?) AND au.app_id = ?"; @@ -1273,7 +1273,7 @@ private static List getPrimaryUserInfoForUserIds_Transaction " WHERE au.primary_or_recipe_user_id IN (SELECT primary_or_recipe_user_id FROM " + getConfig(start).getAppIdToUserIdTable() + " WHERE (user_id IN (" + Utils.generateCommaSeperatedQuestionMarks(userIds.size()) + - ") OR au.primary_or_recipe_user_id IN (" + + ") OR primary_or_recipe_user_id IN (" + Utils.generateCommaSeperatedQuestionMarks(userIds.size()) + ")) AND app_id = ?) AND au.app_id = ?"; diff --git a/src/main/java/io/supertokens/inmemorydb/queries/PasswordlessQueries.java b/src/main/java/io/supertokens/inmemorydb/queries/PasswordlessQueries.java index 0b483a749..e6eee9155 100644 --- a/src/main/java/io/supertokens/inmemorydb/queries/PasswordlessQueries.java +++ b/src/main/java/io/supertokens/inmemorydb/queries/PasswordlessQueries.java @@ -1093,7 +1093,7 @@ private static PasswordlessDeviceRowMapper getInstance() { @Override public PasswordlessDevice map(ResultSet result) throws Exception { - return new PasswordlessDevice(result.getString("device_id_hash"), result.getString("email"), + return new PasswordlessDevice(result.getString("device_id_hash").trim(), result.getString("email"), result.getString("phone_number"), result.getString("link_code_salt"), result.getInt("failed_attempts")); } @@ -1111,7 +1111,7 @@ private static PasswordlessCodeRowMapper getInstance() { @Override public PasswordlessCode map(ResultSet result) throws Exception { - return new PasswordlessCode(result.getString("code_id"), result.getString("device_id_hash"), + return new PasswordlessCode(result.getString("code_id"), result.getString("device_id_hash").trim(), result.getString("link_code_hash"), result.getLong("created_at")); } }