diff --git a/.travis.yml b/.travis.yml index 143a34b6..5bbafef1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,12 @@ language: node_js node_js: - - 0.10 - - 0.12 - - iojs - -cache: - directories: - - node_modules + - 8 + - 10 + - 12 -before_install: - - npm install --upgrade npm -g +matrix: + allow_failures: + - node_js: 12 script: - npm run cover-test @@ -19,4 +16,4 @@ notifications: urls: - https://webhooks.gitter.im/e/7937aa9d2e9d767d0421 on_success: always - on_failure: always \ No newline at end of file + on_failure: always diff --git a/lib/cli/generate.js b/lib/cli/generate.js index d43a92ff..50577f2c 100644 --- a/lib/cli/generate.js +++ b/lib/cli/generate.js @@ -179,8 +179,6 @@ exports.generate = function(program) { /* Generate package.json */ packagejs = '{\n "name": "' + name + '",\n "description": "An awesome real time application",\n "version": "0.0.1",\n'+ ' "author": "Me ",\n "private": true,\n "engines": { "node": ">= 0.10.0" },\n "dependencies": {'; - packagejs += '\n "normalize.css": "3.0.x",'; - packagejs += '\n "es6-shim": "0.33.x",'; packagejs += '\n "socketstream": "0.4.x"'; mods = selectedFormatters.concat(['hogan']); if (program.repl) { diff --git a/lib/http/index.js b/lib/http/index.js index 0da11de2..67161d76 100644 --- a/lib/http/index.js +++ b/lib/http/index.js @@ -181,7 +181,13 @@ module.exports = function(root) { if (settings.strategy.session) { var cookie = { path: '/', - httpOnly: false, + // prevents third-party scripts such as Google Analytics + // and XSS attackers from stealing cookies and gaining access + // to paywalled or otherwise login-protected or private resources + // see https://blog.codinghorror.com/protecting-your-cookies-httponly/ + // It was set to false pre-0.4.6 to support sessions over + // flash transport of socket.io + httpOnly: true, maxAge: sessionOptions.maxAge, secure: settings.secure }; diff --git a/lib/socketstream.js b/lib/socketstream.js index fb9740e0..b138a13c 100644 --- a/lib/socketstream.js +++ b/lib/socketstream.js @@ -207,7 +207,9 @@ function unload() { client.unload(); client.assets.unload(); http.unload(); - if (api.server) api.server.responders = undefined; + if (api.server) { + api.server.responders = undefined; + } ws.unload(); } diff --git a/lib/websocket/transports/engineio/client.js b/lib/websocket/transports/engineio/client.js index 9ce215bb..11c1861f 100644 --- a/lib/websocket/transports/engineio/client.js +++ b/lib/websocket/transports/engineio/client.js @@ -1,4040 +1,4647 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.eio=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o