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

st

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

st - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

2

package.json
{
"name": "st",
"version": "0.2.5",
"version": "0.2.6",
"description": "A module for serving static files. Does etags, caching, etc.",

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

@@ -237,1 +237,15 @@ # st

and such, but serve stylus files as css, for example.
## Security Status
Versions prior to 0.2.5 did not properly prevent folder traversal.
Literal dots in a path were resolved out, but url encoded dots were
not. Thus, a request like
`/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd` would leak sensitive
data from the server.
As of version 0.2.5, any `'/../'` in the request path, urlencoded or
not, will be replaced with `'/'`. If your application depends on url
traversal, then you are encouraged to please refactor so that you do
not depend on having `..` in url paths, as this tends to expose data
that you may be surprised to be exposing.

@@ -164,4 +164,4 @@ module.exports = st

p = p.replace(/%5c/ig, '\\')
p = p.replace(/^[\/\\]?/, '/')
p = p.replace(/[\/\\]\.\.[\/\\]/, '/')
p = p.replace(/^[\/\\]?/g, '/')
p = p.replace(/[\/\\]\.\.[\/\\]/g, '/')

@@ -168,0 +168,0 @@ u = path.normalize(p).replace(/\\/g, '/')

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