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

json-transport

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-transport - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

lib/json-transport.js

@@ -12,3 +12,3 @@ var url = require('url')

var iframeHtmlTemplate = [
'<!doctype html><html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"/><script type="text/javascript">document.domain = "' + options.domain + '"parent.',
'<!doctype html><html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"/><script type="text/javascript">document.domain = "' + options.domain + '";parent.',
'(',

@@ -15,0 +15,0 @@ ')</script></head><body></body></html>'

@@ -6,3 +6,3 @@ {

"keywords": ["json", "jsonp", "transport", "middleware", "streaming"],
"version": "0.1.0",
"version": "0.1.1",
"repository": {

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

@@ -96,3 +96,3 @@ var should = require('should'),

body.should.be.eql('<!doctype html><html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"/><script type="text/javascript">' +
'document.domain = ".default.lan"parent.cb({})</script></head><body></body></html>')
'document.domain = ".default.lan";parent.cb({})</script></head><body></body></html>')
response.headers.should.have.property('content-type')

@@ -106,3 +106,3 @@ response.headers['content-type'].should.be.equal('text/html; charset=UTF-8')

body.should.be.eql('<!doctype html><html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"/><script type="text/javascript">' +
'document.domain = ".default.lan"parent.cb("\\u2028\\u2029")</script></head><body></body></html>')
'document.domain = ".default.lan";parent.cb("\\u2028\\u2029")</script></head><body></body></html>')
done(err)

@@ -164,7 +164,7 @@ })

body.should.be.eql('<!doctype html><html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"/><script type="text/javascript">' +
'document.domain = ".default.lan"parent.cb(["first",\n"second",\n"third"])</script></head><body></body></html>')
'document.domain = ".default.lan";parent.cb(["first",\n"second",\n"third"])</script></head><body></body></html>')
done(err)
}).once('data', function (chunk) {
chunk.toString('utf8').should.be.equal('<!doctype html><html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"/><script type="text/javascript">' +
'document.domain = ".default.lan"parent.cb([')
'document.domain = ".default.lan";parent.cb([')
this.once('data', function (chunk) {

@@ -210,3 +210,3 @@ chunk.toString('utf8').should.be.equal('"first",\n')

body.should.be.eql('<!doctype html><html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"/><script type="text/javascript">' +
'document.domain = ".default.lan"parent.cb([])</script></head><body></body></html>')
'document.domain = ".default.lan";parent.cb([])</script></head><body></body></html>')
done(err)

@@ -213,0 +213,0 @@ })

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