Moved over to lsio base image

This commit is contained in:
Henry Whitaker
2020-06-10 09:51:51 +01:00
parent ad97579af4
commit e2e9221871
3810 changed files with 154712 additions and 56456 deletions

View File

@@ -1,22 +1,28 @@
### 0.1.4 / 2020-06-02
- Remove a ReDoS vulnerability in the header parser (CVE-2020-7662, reported by
Robert McLaughlin)
- Change license from MIT to Apache 2.0
### 0.1.3 / 2017-11-11
* Accept extension names and parameters including uppercase letters
* Handle extension names that clash with `Object.prototype` properties
- Accept extension names and parameters including uppercase letters
- Handle extension names that clash with `Object.prototype` properties
### 0.1.2 / 2017-09-10
* Catch synchronous exceptions thrown when calling an extension
* Fix race condition caused when a message is pushed after a cell has stopped
- Catch synchronous exceptions thrown when calling an extension
- Fix race condition caused when a message is pushed after a cell has stopped
due to an error
* Fix failure of `close()` to return if a message that's queued after one that
- Fix failure of `close()` to return if a message that's queued after one that
produces an error never finishes being processed
### 0.1.1 / 2015-02-19
* Prevent sessions being closed before they have finished processing messages
* Add a callback to `Extensions.close()` so the caller can tell when it's safe
- Prevent sessions being closed before they have finished processing messages
- Add a callback to `Extensions.close()` so the caller can tell when it's safe
to close the socket
### 0.1.0 / 2014-12-12
* Initial release
- Initial release

View File

@@ -1,20 +1,12 @@
# The MIT License
Copyright 2014-2020 James Coglan
Copyright (c) 2014-2017 James Coglan
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
http://www.apache.org/licenses/LICENSE-2.0
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

View File

@@ -234,8 +234,8 @@ then the `permessage-deflate` extension will receive the call:
```js
ext.createServerSession([
{server_no_context_takeover: true, server_max_window_bits: 8},
{server_max_window_bits: 15}
{ server_no_context_takeover: true, server_max_window_bits: 8 },
{ server_max_window_bits: 15 }
]);
```
@@ -251,8 +251,8 @@ implement the following methods, as well as the *Session* API listed below.
```js
clientSession.generateOffer()
// e.g. -> [
// {server_no_context_takeover: true, server_max_window_bits: 8},
// {server_max_window_bits: 15}
// { server_no_context_takeover: true, server_max_window_bits: 8 },
// { server_max_window_bits: 15 }
// ]
```
@@ -277,7 +277,7 @@ must implement the following methods, as well as the *Session* API listed below.
```js
serverSession.generateResponse()
// e.g. -> {server_max_window_bits: 8}
// e.g. -> { server_max_window_bits: 8 }
```
This returns the set of parameters the server session wants to send in its
@@ -327,5 +327,5 @@ the session to release any resources it's using.
## Examples
* Consumer: [websocket-driver](https://github.com/faye/websocket-driver-node)
* Provider: [permessage-deflate](https://github.com/faye/permessage-deflate-node)
- Consumer: [websocket-driver](https://github.com/faye/websocket-driver-node)
- Provider: [permessage-deflate](https://github.com/faye/permessage-deflate-node)

View File

@@ -2,7 +2,7 @@
var TOKEN = /([!#\$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+)/,
NOTOKEN = /([^!#\$%&'\*\+\-\.\^_`\|~0-9A-Za-z])/g,
QUOTED = /"((?:\\[\x00-\x7f]|[^\x00-\x08\x0a-\x1f\x7f"])*)"/,
QUOTED = /"((?:\\[\x00-\x7f]|[^\x00-\x08\x0a-\x1f\x7f"\\])*)"/,
PARAM = new RegExp(TOKEN.source + '(?:=(?:' + TOKEN.source + '|' + QUOTED.source + '))?'),
EXT = new RegExp(TOKEN.source + '(?: *; *' + PARAM.source + ')*', 'g'),
EXT_LIST = new RegExp('^' + EXT.source + '(?: *, *' + EXT.source + ')*$'),
@@ -83,7 +83,7 @@ Offers.prototype.push = function(name, params) {
this._byName[name] = [];
this._byName[name].push(params);
this._inOrder.push({name: name, params: params});
this._inOrder.push({ name: name, params: params });
};
Offers.prototype.eachOffer = function(callback, context) {

View File

@@ -124,11 +124,11 @@ var crypto = require('crypto'),
large = crypto.randomBytes(1 << 14),
small = new Buffer('hi');
deflate.outgoing({data: large}, function() {
deflate.outgoing({ data: large }, function() {
console.log(1, 'large');
});
deflate.outgoing({data: small}, function() {
deflate.outgoing({ data: small }, function() {
console.log(2, 'small');
});
@@ -205,7 +205,7 @@ order is preserved:
```js
var stream = require('stream'),
session = new stream.Transform({objectMode: true});
session = new stream.Transform({ objectMode: true });
session._transform = function(message, _, callback) {
var self = this;
@@ -276,11 +276,11 @@ above:
```js
var functor = new Functor(deflate, 'outgoing');
functor.call({data: large}, function() {
functor.call({ data: large }, function() {
console.log(1, 'large');
});
functor.call({data: small}, function() {
functor.call({ data: small }, function() {
console.log(2, 'small');
});

View File

@@ -15,7 +15,7 @@ Functor.QUEUE_SIZE = 8;
Functor.prototype.call = function(error, message, callback, context) {
if (this._stopped) return;
var record = {error: error, message: message, callback: callback, context: context, done: false},
var record = { error: error, message: message, callback: callback, context: context, done: false },
called = false,
self = this;

View File

@@ -5,7 +5,7 @@ var Cell = require('./cell'),
var Pipeline = function(sessions) {
this._cells = sessions.map(function(session) { return new Cell(session) });
this._stopped = {incoming: false, outgoing: false};
this._stopped = { incoming: false, outgoing: false };
};
Pipeline.prototype.processIncomingMessage = function(message, callback, context) {
@@ -19,7 +19,7 @@ Pipeline.prototype.processOutgoingMessage = function(message, callback, context)
};
Pipeline.prototype.close = function(callback, context) {
this._stopped = {incoming: true, outgoing: true};
this._stopped = { incoming: true, outgoing: true };
var closed = this._cells.map(function(a) { return a.close() });
if (callback)

View File

@@ -112,7 +112,7 @@ var instance = {
},
validFrameRsv: function(frame) {
var allowed = {rsv1: false, rsv2: false, rsv3: false},
var allowed = { rsv1: false, rsv2: false, rsv3: false },
ext;
if (Extensions.MESSAGE_OPCODES.indexOf(frame.opcode) >= 0) {

View File

@@ -1,33 +1,33 @@
{
"_args": [
[
"websocket-extensions@0.1.3",
"/home/henry/Documents/git/Speedtest-checker"
"websocket-extensions@0.1.4",
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
]
],
"_development": true,
"_from": "websocket-extensions@0.1.3",
"_id": "websocket-extensions@0.1.3",
"_from": "websocket-extensions@0.1.4",
"_id": "websocket-extensions@0.1.4",
"_inBundle": false,
"_integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==",
"_integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
"_location": "/websocket-extensions",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "websocket-extensions@0.1.3",
"raw": "websocket-extensions@0.1.4",
"name": "websocket-extensions",
"escapedName": "websocket-extensions",
"rawSpec": "0.1.3",
"rawSpec": "0.1.4",
"saveSpec": null,
"fetchSpec": "0.1.3"
"fetchSpec": "0.1.4"
},
"_requiredBy": [
"/websocket-driver"
],
"_resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz",
"_spec": "0.1.3",
"_where": "/home/henry/Documents/git/Speedtest-checker",
"_resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
"_spec": "0.1.4",
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
"author": {
"name": "James Coglan",
"email": "jcoglan@gmail.com",
@@ -50,7 +50,7 @@
"keywords": [
"websocket"
],
"license": "MIT",
"license": "Apache-2.0",
"main": "./lib/websocket_extensions",
"name": "websocket-extensions",
"repository": {
@@ -60,5 +60,5 @@
"scripts": {
"test": "jstest spec/runner.js"
},
"version": "0.1.3"
"version": "0.1.4"
}