|
@@ -23,8 +23,8 @@ module.exports = (crowi) => {
|
|
|
const validator = {
|
|
const validator = {
|
|
|
password: [
|
|
password: [
|
|
|
body('newPassword').isString().not().isEmpty()
|
|
body('newPassword').isString().not().isEmpty()
|
|
|
- .isLength({ min: 6 })
|
|
|
|
|
- .withMessage('password must be at least 6 characters long'),
|
|
|
|
|
|
|
+ .isLength({ min: 8 })
|
|
|
|
|
+ .withMessage('password must be at least 8 characters long'),
|
|
|
// checking if password confirmation matches password
|
|
// checking if password confirmation matches password
|
|
|
body('newPasswordConfirm').isString().not().isEmpty()
|
|
body('newPasswordConfirm').isString().not().isEmpty()
|
|
|
.custom((value, { req }) => {
|
|
.custom((value, { req }) => {
|
|
@@ -81,7 +81,7 @@ module.exports = (crowi) => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- router.put('/', injectResetOrderByTokenMiddleware, async(req, res) => {
|
|
|
|
|
|
|
+ router.put('/', /* injectResetOrderByTokenMiddleware, */ async(req, res) => {
|
|
|
const { passwordResetOrder } = req;
|
|
const { passwordResetOrder } = req;
|
|
|
const { email } = passwordResetOrder;
|
|
const { email } = passwordResetOrder;
|
|
|
const grobalLang = configManager.getConfig('crowi', 'app:globalLang');
|
|
const grobalLang = configManager.getConfig('crowi', 'app:globalLang');
|