Socket
Socket
Sign inDemoInstall

find-my-way

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-my-way - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

14

index.js

@@ -135,5 +135,3 @@ 'use strict'

Router.prototype.lookup = function (req, res) {
var i = 0
while (i < req.url.length && req.url.charCodeAt(i) !== 63 /* ? */ && req.url.charCodeAt(i) !== 35 /* # */) i++
var handle = this.find(req.method, req.url.slice(0, i))
var handle = this.find(req.method, sanitizeUrl(req.url))
if (!handle) return this._defaultRoute(req, res)

@@ -235,1 +233,11 @@ return handle.handler(req, res, handle.params, handle.store)

module.exports = Router
function sanitizeUrl (url) {
for (var i = 0; i < url.length; i++) {
var charCode = url.charCodeAt(i)
if (charCode === 63 /* ? */ || charCode === 35 /* # */) {
return url.slice(0, i)
}
}
return url
}
{
"name": "find-my-way",
"version": "0.2.3",
"version": "0.2.4",
"description": "Crazy fast http radix based router",

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

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