aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src/main/java/com/juick/service/UserServiceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-jdbc/src/main/java/com/juick/service/UserServiceImpl.java')
-rw-r--r--juick-server-jdbc/src/main/java/com/juick/service/UserServiceImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-server-jdbc/src/main/java/com/juick/service/UserServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/UserServiceImpl.java
index 3f7cebf6..a0a07fb3 100644
--- a/juick-server-jdbc/src/main/java/com/juick/service/UserServiceImpl.java
+++ b/juick-server-jdbc/src/main/java/com/juick/service/UserServiceImpl.java
@@ -21,8 +21,8 @@ import com.juick.User;
import com.juick.server.helpers.AnonymousUser;
import com.juick.server.helpers.Auth;
import com.juick.server.helpers.UserInfo;
-import com.juick.server.util.HashUtils;
import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.jdbc.core.RowMapper;
@@ -299,7 +299,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
"SELECT hash FROM logins WHERE user_id = ?", String.class, uid);
if (list.isEmpty()) {
- String hash = HashUtils.generateHash(16);
+ String hash = RandomStringUtils.randomAlphanumeric(16).toUpperCase();
getJdbcTemplate().update("INSERT INTO logins(user_id, hash) VALUES (?, ?)", uid, hash);
return hash;
}