🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

middleware-sanitizeurl

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

middleware-sanitizeurl

ExpressJS middleware that checks request URL for potentially breaking things

latest
Source
npmnpm
Version
2.0.2
Version published
Maintainers
3
Created
Source

middleware-sanitizeurl

ExpressJS middleware that checks request URL for potentially breaking things, such as:

  • Unparsable query string sequences that would crash on attempt to parse on the client side
  • Double question mark in URL
  • Multiple slashes

After one of the above checks fails the middleware attempts to guess a safe variant of the url and redirect there.

Options:

  • redirectTo (string): When url contains breaking character sequences and is impossible to parse, redirect to this URL, default: '/'

Usage:

app.use(require('middleware-sanitizeurl')());

Keywords

express

FAQs

Package last updated on 28 Oct 2019

Did you know?

Socket

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.

Install

Related posts