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

restify

Package Overview
Dependencies
Maintainers
1
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restify - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

10

lib/server.js

@@ -170,3 +170,11 @@ // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.

pieces = decoded !== null ? decoded.split(':', 2) : null;
if (decoded !== null) {
var idx = decoded.indexOf(':');
if (idx === -1) {
pieces = [decoded];
} else {
pieces = [decoded.slice(0, idx), decoded.slice(idx + 1)];
}
}
if (!(pieces !== null ? pieces[0] : null) ||

@@ -173,0 +181,0 @@ !(pieces !== null ? pieces[1] : null)) {

2

package.json
{
"name": "restify",
"description": "REST framework specifically meant for web service APIs",
"version": "0.4.3",
"version": "0.4.4",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

@@ -17,2 +17,3 @@ // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.

var password = uuid();
var trickyPassword = 'pass:word';

@@ -32,3 +33,4 @@

req.authorization.basic.username !== username ||
req.authorization.basic.password !== password) {
(req.authorization.basic.password !== password &&
req.authorization.basic.password !== trickyPassword)) {
res.send(401);

@@ -63,3 +65,15 @@ }

exports.test_tricky_password = function(test, assert) {
var opts = common.newOptions(socket, '/test/unit');
opts.method = 'GET';
opts.headers.authorization = 'Basic ' +
new Buffer(username + ':' + 'pass:word', 'utf8').toString('base64');
http.request(opts, function(res) {
common.checkResponse(assert, res);
assert.equal(res.statusCode, 200);
test.finish();
}).end();
};
exports.test_no_auth = function(test, assert) {

@@ -116,3 +130,2 @@ var opts = common.newOptions(socket, '/test/unit');

exports.tearDown = function(test, assert) {

@@ -119,0 +132,0 @@ server.on('close', function() {

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