
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@3merge/express-auth-middleware
Advanced tools
Work in progress!
Discriminating the user model, the preferred approach, assigns a kind
property to all documents. I recommend using the decorator functions in this module to get/set properties in the base as well.
Property | Type | Description | Default |
---|---|---|---|
active | boolean | System-generated to keep track of "deleted" users | true |
email* | string | Self-explanatory | null |
firstName* | string | Self-explanatory | null |
frozen | boolean | Somewhat of an alias for active, only setting it does not affect other properties | false |
lang | string | The preferred locale (en-CA or fr-CA ). | en-CA |
lastName* | string | Self-explanatory | null |
loginAttempts | number | Used to block excessive login attempts (< 5) | 0 |
password | password | Used to authenticate | null |
secret* | string | Used to read and write JWT tokens. Nullifying this would destroy all active sessions | null |
verified | boolean | Represents the validity of an email address. Login attempts are blocked without verification | false |
Name | Description | Return |
---|---|---|
await Model.findByEmail(string) | Lookup active users by email address | object |
await Model.findUnverifiedByEmail(string) | Lookup unverified users by email | object |
await Model.findVerifiedByEmail(string) | Lookup verified users by email | object |
await Model.findVerifiedById(string) | Lookup verified users by id | object |
await doc.setSecret() | Generate secret token | object |
await doc.verifyPassword(string, boolean) | Compare string against stored password. Throws error if second parameter is true | boolean |
await doc.deactivate() | Deletes a user for most intents-and-purposes | object |
doc.isBlocked | Is the user allowed to login? | boolean |
doc.hasExpired | Has more than 24 hours elapsed since requesting verification? | boolean |
doc.isPermitted | Does the user have all the necessary properties to login? | boolean |
FAQs
Authentication middleware for Express APIs
The npm package @3merge/express-auth-middleware receives a total of 3 weekly downloads. As such, @3merge/express-auth-middleware popularity was classified as not popular.
We found that @3merge/express-auth-middleware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.