From 58d1eaf7e315c623eb8347165e973dfb0689d467 Mon Sep 17 00:00:00 2001 From: serjihsklovski Date: Sun, 25 Jun 2017 18:05:01 +0300 Subject: [PATCH] encoding password after post --- pom.xml | 2 +- src/main/java/org/teapot/backend/controller/UserController.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0e2ba23..7fc7048 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ 4.0.0 org.teapot teapot-backend - 1.0.1 + 1.0.2 jar diff --git a/src/main/java/org/teapot/backend/controller/UserController.java b/src/main/java/org/teapot/backend/controller/UserController.java index 0067591..536963f 100644 --- a/src/main/java/org/teapot/backend/controller/UserController.java +++ b/src/main/java/org/teapot/backend/controller/UserController.java @@ -174,6 +174,8 @@ public User registerUser(@RequestBody User user, } user.setRegistrationDate(LocalDateTime.now()); + user.setPassword(passwordEncoder.encode(user.getPassword())); + if (auth == null) { user = userRepository.save(user); verificationMailSender.createTokenAndSend(user, request.getLocale());