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

ecstatic

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecstatic - npm Package Compare versions

Comparing version 0.4.9 to 0.4.10

test/malformed-dir.js

22

lib/ecstatic/showdir.js

@@ -103,9 +103,19 @@ var ecstatic = require('../ecstatic'),

var failed = false
var writeRow = function (file, i) {
html += '<tr><td><code>(' + perms(file[1]) + ')</code> <a href="'
+ ent.encode(decodeURI(
try {
var decoded = decodeURI(
req.url.replace(/\/$/, '')
+ '/'
+ file[0]
)) + '">' + ent.encode(file[0]) + '</a></td></tr>\n';
);
}
catch (err) {
failed = true;
res.statusCode = 400;
return res.end(err + '\n')
}
html += '<tr><td><code>(' + perms(file[1]) + ')</code> <a href="'
+ ent.encode(decoded)
+ '">' + ent.encode(file[0]) + '</a></td></tr>\n';
}

@@ -125,4 +135,6 @@

res.writeHead(200, { "Content-Type": "text/html" });
res.end(html);
if (!failed) {
res.writeHead(200, { "Content-Type": "text/html" });
res.end(html);
}
}

@@ -129,0 +141,0 @@ });

@@ -5,3 +5,3 @@ {

"description": "A simple static file server middleware that works with both Express and Flatiron",
"version": "0.4.9",
"version": "0.4.10",
"homepage": "https://github.com/jesusabdullah/node-ecstatic",

@@ -8,0 +8,0 @@ "repository": {

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