aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-05-31 20:21:08 +0300
committerGravatar Vitaly Takmazov2018-05-31 20:21:08 +0300
commit1272510e6cd89a02ba7e94e22d795d91a22d4bac (patch)
treedc6f36cb11c1434214cd7957c267c404c9e12896 /juick-www/src/main/java/com/juick/www
parent485600a958c13707e9a1d4940e254f449ecab8ca (diff)
ugnich random -> commons-lang3 RandomStringUtils
Diffstat (limited to 'juick-www/src/main/java/com/juick/www')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/Settings.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/Settings.java b/juick-www/src/main/java/com/juick/www/controllers/Settings.java
index 7f6cce44..f9527423 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/Settings.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/Settings.java
@@ -21,6 +21,7 @@ import com.juick.server.helpers.NotifyOpts;
import com.juick.server.helpers.UserInfo;
import com.juick.server.util.*;
import com.juick.service.*;
+import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -186,7 +187,7 @@ public class Settings {
break;
case "email-add":
if (!emailService.verifyAddressByCode(visitor.getUid(), request.getParameter("account"))) {
- String authCode = HashUtils.generateHash(8);
+ String authCode = RandomStringUtils.randomAlphanumeric(8).toUpperCase();
if (emailService.addVerificationCode(visitor.getUid(), request.getParameter("account"), authCode)) {
Session session = Session.getDefaultInstance(System.getProperties());
try {