verdaccio-security-filter 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +7 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -193,7 +193,13 @@ class SecurityFilterPlugin {
|
|
|
193
193
|
this.logger.info(`[Middleware] Config mode: ${this.config.mode || 'NOT SET'}`);
|
|
194
194
|
app.use((req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
195
195
|
try {
|
|
196
|
-
|
|
196
|
+
let path = req.url.split('?')[0];
|
|
197
|
+
try {
|
|
198
|
+
path = decodeURIComponent(path);
|
|
199
|
+
}
|
|
200
|
+
catch (_a) {
|
|
201
|
+
}
|
|
202
|
+
const urlMatch = path.match(/^\/(@[^/]+\/)?([^/]+)(?:\/-\/([^/]+\.tgz))?/);
|
|
197
203
|
if (!urlMatch) {
|
|
198
204
|
this.logger.debug(`[Middleware] Non-package request: ${req.method} ${req.url}`);
|
|
199
205
|
return next();
|
package/package.json
CHANGED