Socket
Socket
Sign inDemoInstall

authen-express

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

authen-express - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

10

lib/index.js

@@ -14,5 +14,11 @@ "use strict";

var user = req.body;
if (!user.username || user.username.length === 0 || !user.password || user.password.length === 0) {
res.status(401).end('username and password cannot be empty');
if (!user.username || user.username.length === 0) {
return res.status(401).end('username cannot be empty');
}
if (!user.password || user.password.length === 0) {
return res.status(401).end('password cannot be empty');
}
if (user.step && user.step > 1 && (!user.passcode || user.passcode.length === 0)) {
return res.status(401).end('passcode cannot be empty');
}
if (this.decrypt) {

@@ -19,0 +25,0 @@ var p = this.decrypt(user.password);

2

package.json
{
"name": "authen-express",
"version": "0.0.2",
"version": "0.0.3",
"description": "authen-express",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -57,5 +57,11 @@ import { Request, Response } from 'express';

const user: T = req.body;
if (!user.username || user.username.length === 0 || !user.password || user.password.length === 0) {
res.status(401).end('username and password cannot be empty');
if (!user.username || user.username.length === 0) {
return res.status(401).end('username cannot be empty');
}
if (!user.password || user.password.length === 0) {
return res.status(401).end('password cannot be empty');
}
if (user.step && user.step > 1 && (!user.passcode || user.passcode.length === 0)) {
return res.status(401).end('passcode cannot be empty');
}
if (this.decrypt) {

@@ -62,0 +68,0 @@ const p = this.decrypt(user.password);

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