Commit 519e2bbb authored by Bruno López Trigo's avatar Bruno López Trigo

Solucionadas vulnerabilidades node

parent 05e834ed

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

{
"data" : [ [ 50, 15, 3, 0, 0, 1, 1 ], [ 16, 47, 6, 0, 2, 3, 2 ], [ 5, 4, 7, 0, 0, 1, 0 ], [ 0, 0, 0, 0, 0, 0, 0 ], [ 0, 2, 0, 0, 10, 0, 1 ], [ 1, 1, 0, 0, 0, 7, 0 ], [ 3, 2, 0, 0, 0, 1, 23 ] ],
"adjMatrix" : [ [ false, true, true, false, false, true, true ], [ true, false, true, false, true, true, true ], [ true, true, false, false, false, true, false ], [ false, false, false, false, false, false, false ], [ false, true, false, false, false, false, true ], [ true, true, false, false, false, false, false ], [ true, true, false, false, false, true, false ] ],
"confused" : { }
}
\ No newline at end of file
{
"data" : [ [ 68, 1, 0, 0, 0, 0, 1 ], [ 1, 74, 1, 0, 0, 0, 0 ], [ 0, 0, 17, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 12, 0, 0 ], [ 0, 0, 0, 0, 0, 9, 0 ], [ 0, 2, 0, 0, 1, 0, 26 ] ],
"adjMatrix" : null,
"confused" : {
"6:1" : [ 57, 116 ],
"4:1" : [ 47 ],
"6:4" : [ 127 ],
"1:0" : [ 168 ],
"1:2" : [ 205 ],
"0:1" : [ 208 ],
"0:6" : [ 143 ]
}
}
\ No newline at end of file
../csso/bin/csso
\ No newline at end of file
../internal-ip/cli.js
\ No newline at end of file
../rc/cli.js
\ No newline at end of file
../strip-indent/cli.js
\ No newline at end of file
../sw-precache/cli.js
\ No newline at end of file
## 2.0.0
Modernization updates thanks to @TimothyGu:
- Use jsdom's eslint config, remove jscs
- Move syntax to ES6
- Remove Babel
- Via: https://github.com/jsdom/abab/pull/26
## 1.0.4
- Added license file
......
# abab
# abab [![npm version](https://badge.fury.io/js/abab.svg)](https://www.npmjs.com/package/abab) [![Build Status](https://travis-ci.org/jsdom/abab.svg?branch=master)](https://travis-ci.org/jsdom/abab)
[![npm version](https://badge.fury.io/js/abab.svg)](https://www.npmjs.com/package/abab) [![Build Status](https://travis-ci.org/jsdom/abab.svg?branch=master)](https://travis-ci.org/jsdom/abab)
A JavaScript module that implements `window.atob` and `window.btoa` according the forgiving-base64 algorithm in the [Infra Standard](https://infra.spec.whatwg.org/#forgiving-base64). The original code was forked from [w3c/web-platform-tests](https://github.com/w3c/web-platform-tests/blob/master/html/webappapis/atob/base64.html).
A module that implements `window.atob` and `window.btoa` according to the [WHATWG spec](https://html.spec.whatwg.org/multipage/webappapis.html#atob). The code is originally from [w3c/web-platform-tests](https://github.com/w3c/web-platform-tests/blob/master/html/webappapis/atob/base64.html).
Compatibility: Node.js version 3+ and all major browsers (using browserify or webpack)
Compatibility: Node.js version 3+ and all major browsers.
Install with `npm`:
......@@ -17,14 +15,14 @@ npm install abab
### `btoa` (base64 encode)
```js
const btoa = require('abab').btoa;
const { btoa } = require('abab');
btoa('Hello, world!'); // 'SGVsbG8sIHdvcmxkIQ=='
```
### `atob` (base64 decode)
```js
const atob = require('abab').atob;
const { atob } = require('abab');
atob('SGVsbG8sIHdvcmxkIQ=='); // 'Hello, world!'
```
......@@ -37,8 +35,8 @@ atob('SGVsbG8sIHdvcmxkIQ=='); // 'Hello, world!'
If you want to include just one of the methods to save bytes in your client-side code, you can `require` the desired module directly.
```js
var atob = require('abab/lib/atob');
var btoa = require('abab/lib/btoa');
const atob = require('abab/lib/atob');
const btoa = require('abab/lib/btoa');
```
-----
......
'use strict';
"use strict";
var atob = require('./lib/atob');
var btoa = require('./lib/btoa');
const atob = require("./lib/atob");
const btoa = require("./lib/btoa");
module.exports = {
atob: atob,
btoa: btoa
atob,
btoa
};
'use strict';
"use strict";
/**
* Implementation of atob() according to the HTML spec, except that instead of
* throwing INVALID_CHARACTER_ERR we return null.
* Implementation of atob() according to the HTML and Infra specs, except that
* instead of throwing INVALID_CHARACTER_ERR we return null.
*/
function atob(input) {
// WebIDL requires DOMStrings to just be converted using ECMAScript
// ToString, which in our case amounts to calling String().
input = String(input);
// "Remove all space characters from input."
input = input.replace(/[ \t\n\f\r]/g, '');
// "If the length of input divides by 4 leaving no remainder, then: if
// input ends with one or two U+003D EQUALS SIGN (=) characters, remove
// them from input."
if (input.length % 4 == 0 && /==?$/.test(input)) {
input = input.replace(/==?$/, '');
function atob(data) {
// Web IDL requires DOMStrings to just be converted using ECMAScript
// ToString, which in our case amounts to using a template literal.
data = `${data}`;
// "Remove all ASCII whitespace from data."
data = data.replace(/[ \t\n\f\r]/g, "");
// "If data's length divides by 4 leaving no remainder, then: if data ends
// with one or two U+003D (=) code points, then remove them from data."
if (data.length % 4 === 0) {
data = data.replace(/==?$/, "");
}
// "If the length of input divides by 4 leaving a remainder of 1, throw an
// INVALID_CHARACTER_ERR exception and abort these steps."
// "If data's length divides by 4 leaving a remainder of 1, then return
// failure."
//
// "If input contains a character that is not in the following list of
// characters and character ranges, throw an INVALID_CHARACTER_ERR
// exception and abort these steps:
// "If data contains a code point that is not one of
//
// U+002B PLUS SIGN (+)
// U+002F SOLIDUS (/)
// U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9)
// U+0041 LATIN CAPITAL LETTER A to U+005A LATIN CAPITAL LETTER Z
// U+0061 LATIN SMALL LETTER A to U+007A LATIN SMALL LETTER Z"
if (input.length % 4 == 1 || !/^[+/0-9A-Za-z]*$/.test(input)) {
// U+002B (+)
// U+002F (/)
// ASCII alphanumeric
//
// then return failure."
if (data.length % 4 === 1 || /[^+/0-9A-Za-z]/.test(data)) {
return null;
}
// "Let output be a string, initially empty."
var output = '';
// "Let buffer be a buffer that can have bits appended to it, initially
// empty."
// "Let output be an empty byte sequence."