Comparing version 2.13.15 to 2.13.16
@@ -85,3 +85,3 @@ "use strict"; | ||
this.limitRate('send_mail', 3600, 30); | ||
const t = await token.add(token.TYPE_REGISTRATION, await system.get('registration_token_expire_seconds'), { mail }); | ||
const t = await token.add(token.TYPE_REGISTRATION, await system.get('session.unsaved_expire_seconds'), { mail }); | ||
if (await system.get('smtp.user')) { | ||
@@ -106,6 +106,6 @@ const m = await this.renderHTML('user_register_mail.html', { | ||
this.response.template = 'user_register_with_code.html'; | ||
const { mail } = await token.get(code, token.TYPE_REGISTRATION); | ||
if (!mail) | ||
const tdoc = await token.get(code, token.TYPE_REGISTRATION); | ||
if (!tdoc) | ||
throw new error_1.InvalidTokenError(token.TYPE_REGISTRATION, code); | ||
this.response.body = { mail }; | ||
this.response.body = tdoc; | ||
} | ||
@@ -145,3 +145,3 @@ async post(domainId, password, verify, uname, code) { | ||
throw new error_1.UserNotFoundError(mail); | ||
const [tid] = await token.add(token.TYPE_LOSTPASS, await system.get('lostpass_token_expire_seconds'), { uid: udoc._id }); | ||
const [tid] = await token.add(token.TYPE_LOSTPASS, await system.get('session.unsaved_expire_seconds'), { uid: udoc._id }); | ||
const m = await this.renderHTML('user_lostpass_mail', { url: `lostpass/${tid}`, uname: udoc.uname }); | ||
@@ -148,0 +148,0 @@ await mail_1.sendMail(mail, 'Lost Password', 'user_lostpass_mail', m); |
{ | ||
"name": "hydrooj", | ||
"version": "2.13.15", | ||
"version": "2.13.16", | ||
"bin": "bin/hydrooj.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/loader.js", |
@@ -65,3 +65,3 @@ import moment from 'moment-timezone'; | ||
token.TYPE_REGISTRATION, | ||
await system.get('registration_token_expire_seconds'), | ||
await system.get('session.unsaved_expire_seconds'), | ||
{ mail }, | ||
@@ -86,5 +86,5 @@ ); | ||
this.response.template = 'user_register_with_code.html'; | ||
const { mail } = await token.get(code, token.TYPE_REGISTRATION); | ||
if (!mail) throw new InvalidTokenError(token.TYPE_REGISTRATION, code); | ||
this.response.body = { mail }; | ||
const tdoc = await token.get(code, token.TYPE_REGISTRATION); | ||
if (!tdoc) throw new InvalidTokenError(token.TYPE_REGISTRATION, code); | ||
this.response.body = tdoc; | ||
} | ||
@@ -123,3 +123,3 @@ | ||
token.TYPE_LOSTPASS, | ||
await system.get('lostpass_token_expire_seconds'), | ||
await system.get('session.unsaved_expire_seconds'), | ||
{ uid: udoc._id }, | ||
@@ -126,0 +126,0 @@ ); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1731423