Socket
Socket
Sign inDemoInstall

web-app-runner

Package Overview
Dependencies
6
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.90.48 to 0.90.49

27

lib/WebAppRunner.js

@@ -138,17 +138,22 @@ /**

if (visitor && visitor.ip === '127.0.0.1' && url === '/shutdown' && method === 'POST') {
if (visitor && url === '/shutdown' && method === 'POST') {
log.info('shutdown request from ip: ', visitor.ip, ', url: ', url);
msg = [ 'shutting down from pid: ', process.pid, '\n' ].join('');
if (dash.endsWith( visitor.ip, '127.0.0.1')) {
msg = [ 'shutting down from pid: ', process.pid, '\n' ].join('');
response.writeHead(200, {
'Content-Length': msg.length,
'Content-Type': 'text/plain'
});
response.writeHead(200, {
'Content-Length': msg.length,
'Content-Type': 'text/plain'
});
response.end( msg, function(err) {
log.info('sent, now closing...');
process.nextTick( server.stop );
server.killme();
});
response.end( msg, function(err) {
log.info('sent, now closing...');
process.nextTick( server.stop );
server.killme();
});
} else {
log.warn('shutdown rejected, bad ip: ', visitor.ip);
next();
}
} else {

@@ -155,0 +160,0 @@ next();

{
"name": "web-app-runner",
"version": "0.90.48",
"version": "0.90.49",
"description": "A simple HTTP application server that accepts or rejects connections based on authenticated attributes including ip, user agent, etc. The server can be used stand alone or as middleware for connect or express.",

@@ -24,3 +24,3 @@ "main": "./app/app.js",

"connect-gzip-static": "^1.0.0",
"lodash": "^3.6.0",
"lodash": "^3.7.0",
"node-uuid": "^1.4.1",

@@ -27,0 +27,0 @@ "simple-node-logger": "^0.92.18"

@@ -215,2 +215,2 @@ # Web App Runner

- - -
<p><small><em>Copyright © 2014-2015, rain city software | Version 0.90.48</em></small></p>
<p><small><em>Copyright © 2014-2015, rain city software | Version 0.90.49</em></small></p>

@@ -205,3 +205,3 @@ /**

visitor.ip = '127.0.0.1';
visitor.ip = '::ffff:127.0.0.1'; // test for ip6
visitor.url = '/shutdown';

@@ -208,0 +208,0 @@ visitor.method = 'POST';

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc