Skip to content

Commit 0b26bc3

Browse files
Matt Grandedarrachequesne
Matt Grande
authored andcommittedSep 27, 2017
[fix] Remove parsejson dependency (#580)
Related: https://nodesecurity.io/advisories/528.
1 parent b949abc commit 0b26bc3

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed
 

‎lib/socket.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ var debug = require('debug')('engine.io-client:socket');
88
var index = require('indexof');
99
var parser = require('engine.io-parser');
1010
var parseuri = require('parseuri');
11-
var parsejson = require('parsejson');
1211
var parseqs = require('parseqs');
1312

1413
/**
@@ -439,7 +438,7 @@ Socket.prototype.onPacket = function (packet) {
439438

440439
switch (packet.type) {
441440
case 'open':
442-
this.onHandshake(parsejson(packet.data));
441+
this.onHandshake(JSON.parse(packet.data));
443442
break;
444443

445444
case 'pong':

‎package.json

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"engine.io-parser": "~2.1.1",
3030
"has-cors": "1.1.0",
3131
"indexof": "0.0.1",
32-
"parsejson": "0.0.3",
3332
"parseqs": "0.0.5",
3433
"parseuri": "0.0.5",
3534
"ws": "~2.3.1",

0 commit comments

Comments
 (0)
Please sign in to comment.