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

oauth_reverse_proxy

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oauth_reverse_proxy - npm Package Compare versions

Comparing version 0.9.9 to 0.9.10

2

lib/proxy/index.js

@@ -135,3 +135,3 @@ var _ = require('underscore');

this_obj.logger.info("Listening on port %s", this_obj.config.from_port);
this_obj.server.listen(this_obj.config.from_port);
this_obj.server.listen(this_obj.config.from_port, '::');

@@ -138,0 +138,0 @@ cb(null, this_obj);

{
"name": "oauth_reverse_proxy",
"description": "An OAuth 1.0a authenticating reverse proxy",
"version": "0.9.9",
"version": "0.9.10",
"contributors": [

@@ -6,0 +6,0 @@ {

@@ -9,3 +9,3 @@ {

],
"required_hosts": [ "localhost" ]
"required_hosts": [ "localhost", "::1" ]
}

@@ -30,2 +30,9 @@ var fs = require('fs');

// Run tests for unauthenticated requests on IPv6
['GET', 'DELETE'].forEach(function(verb) {
it ('should return a valid response to an IPv6 ' + verb, function(done) {
request_sender.sendRequest(verb, 'http://[::]:8080/job/unauthenticated_uri', null, 200, done);
});
});
// Run tessts for unauthenticated POSTs and PUTs

@@ -32,0 +39,0 @@ ['PUT', 'POST'].forEach(function(verb) {

@@ -21,2 +21,7 @@ // All the messy business of creating and sending requests (both authenticated and unauthenticated)

// Validate that a basic GET or DELETE over IPv6 works.
it ("should accept a properly signed " + verb + " over IPv6", function(done) {
request_sender.sendAuthenticatedRequest(verb, 'http://[::1]:8008/job/12345', {hostname: '[::1]'}, 200, done);
});
// Validate that a GET or DELETE with query parameters works.

@@ -28,2 +33,8 @@ it ("should accept a properly signed " + verb + " with query", function(done) {

// Validate that a GET or DELETE over IPv6 with query parameters works.
it ("should accept a properly signed " + verb + " over IPv6 with query", function(done) {
request_sender.params.push(['query', 'ok']);
request_sender.sendAuthenticatedRequest(verb, 'http://[::1]:8008/job/12345?query=ok', {hostname: '[::1]'}, 200, done);
});
// Validate that a GET or DELETE with unsigned query parameters fails due to signature mismatch.

@@ -30,0 +41,0 @@ it ("should reject an improperly signed " + verb + " where query params are not part of the signature", function(done) {

@@ -22,3 +22,3 @@ var _ = require('underscore');

headers: {
host: 'prdlexbun001.vistaprint.svc'
host: 'test.cimpress.com'
},

@@ -44,3 +44,3 @@ connection: {

headers: {
host: 'prdlexbun001.vistaprint.svc'
host: 'test.cimpress.com'
},

@@ -68,3 +68,3 @@ connection: {

['host', 'localhost:8080'],
['x-forwarded-for', '127.0.0.1'],
['x-forwarded-for', '::ffff:127.0.0.1'],
['x-forwarded-port', '8008'],

@@ -91,3 +91,3 @@ ['x-forwarded-proto', 'http'],

['host', 'localhost:8080'],
['x-forwarded-for', '127.0.0.1'],
['x-forwarded-for', '::ffff:127.0.0.1'],
['x-forwarded-port', '8008'],

@@ -114,3 +114,3 @@ ['x-forwarded-proto', 'http'],

['host', 'localhost:8080'],
['x-forwarded-for', '127.0.0.1'],
['x-forwarded-for', '::ffff:127.0.0.1'],
['x-forwarded-port', '8008'],

@@ -177,3 +177,3 @@ ['x-forwarded-proto', 'http'],

headers: {
host: 'prdlexbun001.vistaprint.svc:8000'
host: 'test.cimpress.com:8000'
}

@@ -186,3 +186,3 @@ };

host_header_modifier(stub_request, null, function() {
stub_request.headers.host.should.equal('prdlexbun001.vistaprint.svc:8888');
stub_request.headers.host.should.equal('test.cimpress.com:8888');
done();

@@ -195,3 +195,3 @@ });

host_header_modifier(stub_request, null, function() {
stub_request.headers.host.should.equal('prdlexbun001.vistaprint.svc:8888');
stub_request.headers.host.should.equal('test.cimpress.com:8888');
done();

@@ -205,3 +205,3 @@ });

host_header_modifier(stub_request, null, function() {
stub_request.headers.host.should.equal('prdlexbun001.vistaprint.svc');
stub_request.headers.host.should.equal('test.cimpress.com');
done();

@@ -212,6 +212,6 @@ });

it("should support modifying a host header from a standard port (" + port + ") to a custom port", function(done) {
stub_request.headers.host = 'prdlexbun001.vistaprint.svc';
stub_request.headers.host = 'test.cimpress.com';
var host_header_modifier = header_modifier.modifyHostHeaders(port, 8000);
host_header_modifier(stub_request, null, function() {
stub_request.headers.host.should.equal('prdlexbun001.vistaprint.svc:8000');
stub_request.headers.host.should.equal('test.cimpress.com:8000');
done();

@@ -224,3 +224,3 @@ });

host_header_modifier(stub_request, null, function() {
stub_request.headers.host.should.equal('prdlexbun001.vistaprint.svc');
stub_request.headers.host.should.equal('test.cimpress.com');
done();

@@ -227,0 +227,0 @@ });

@@ -151,5 +151,5 @@ var express = require('express');

initted = true;
app.listen(port, 'localhost', function(err) {
app.listen(port, '::', function(err) {
cb(err);
});
};

Sorry, the diff of this file is not supported yet

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