Files
node/lib
Rich Trott 56950674d6 crypto,tls: fix mutability of return values
If you alter the array returned by `tls.getCiphers()`,
`crypto.getCiphers()`, `crypto.getHashes()`, or `crypto.getCurves()`, it
will alter subsequent return values from those functions.

```js
'use strict';

const crypto = require('crypto');

var hashes = crypto.getHashes();

hashes.splice(0, hashes.length);

hashes.push('some-arbitrary-value');

console.log(crypto.getHashes()); // "['some-arbitrary-value']"
```

This is surprising. Change functions to return copy of array instead.

PR-URL: https://github.com/nodejs/node/pull/10795
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-01-16 20:32:23 -08:00
..
2017-01-11 12:55:04 -05:00
2016-10-14 13:37:12 -07:00
2016-10-16 22:01:02 +02:00
2016-11-29 07:33:24 -05:00
2017-01-05 12:33:10 -08:00
2016-10-18 15:38:43 -07:00
2017-01-06 14:36:01 -08:00
2016-10-04 12:17:32 -04:00
2016-08-10 23:41:28 +02:00
2017-01-16 10:40:26 -08:00
2016-11-06 20:18:56 +02:00