@hapi/call
Advanced tools
Comparing version
'use strict'; | ||
const Address = require('@hapi/address'); | ||
const Boom = require('@hapi/boom'); | ||
const Hoek = require('@hapi/hoek'); | ||
const Boom = require('@hapi/boom'); | ||
@@ -119,5 +120,5 @@ const Regex = require('./regex'); | ||
const name = match.record.params[i]; | ||
const value = internals.decode(match.array[i]); | ||
if (value.isBoom) { | ||
return this.specials.badRequest || value; | ||
const value = Address.uri.decode(match.array[i]); | ||
if (value === null) { | ||
return this.specials.badRequest || Boom.badRequest('Invalid request path'); | ||
} | ||
@@ -143,13 +144,2 @@ | ||
internals.decode = function (value) { | ||
try { | ||
return decodeURIComponent(value); | ||
} | ||
catch (err) { | ||
return Boom.badRequest('Invalid request path'); | ||
} | ||
}; | ||
internals.Router.prototype.normalize = function (path) { | ||
@@ -156,0 +146,0 @@ |
{ | ||
"name": "@hapi/call", | ||
"description": "HTTP Router", | ||
"version": "5.1.2", | ||
"version": "6.0.0", | ||
"repository": "git://github.com/hapijs/call", | ||
@@ -12,8 +12,9 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@hapi/hoek": "8.x.x", | ||
"@hapi/boom": "7.x.x" | ||
"@hapi/address": "^3.2.0", | ||
"@hapi/boom": "8.x.x", | ||
"@hapi/hoek": "8.x.x" | ||
}, | ||
"devDependencies": { | ||
"@hapi/code": "6.x.x", | ||
"@hapi/lab": "20.x.x" | ||
"@hapi/code": "7.x.x", | ||
"@hapi/lab": "21.x.x" | ||
}, | ||
@@ -20,0 +21,0 @@ "scripts": { |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
22704
-0.31%3
50%499
-1.38%+ Added
+ Added
+ Added
- Removed
Updated