Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-serve

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-serve - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Changelog

## [1.0.2] - 2020-07-17
### Fixed
- Fix path traversal issue
## [1.0.1] - 2019-01-27

@@ -7,0 +11,0 @@ ### Added

5

dist/index.cjs.js

@@ -34,4 +34,7 @@ 'use strict';

// Remove querystring
var urlPath = decodeURI(request.url.split('?')[0]);
var unsafePath = decodeURI(request.url.split('?')[0]);
// Don't allow path traversal
var urlPath = path.normalize(unsafePath);
Object.keys(options.headers).forEach(function (key) {

@@ -38,0 +41,0 @@ response.setHeader(key, options.headers[key]);

import { readFile } from 'fs';
import { createServer } from 'https';
import { createServer as createServer$1 } from 'http';
import { resolve } from 'path';
import { resolve, normalize } from 'path';
import mime from 'mime';

@@ -30,4 +30,7 @@ import opener from 'opener';

// Remove querystring
var urlPath = decodeURI(request.url.split('?')[0]);
var unsafePath = decodeURI(request.url.split('?')[0]);
// Don't allow path traversal
var urlPath = normalize(unsafePath);
Object.keys(options.headers).forEach(function (key) {

@@ -34,0 +37,0 @@ response.setHeader(key, options.headers[key]);

{
"name": "rollup-plugin-serve",
"version": "1.0.1",
"version": "1.0.2",
"description": "Serve your rolled up bundle",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.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