Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hydrooj

Package Overview
Dependencies
Maintainers
1
Versions
1059
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hydrooj - npm Package Compare versions

Comparing version 2.13.15 to 2.13.16

10

dist/handler/user.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc