mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 18:52:14 +03:00
Added Node v10 Support (#10058)
* Added Node v10 Support no issue Signed-off-by: kirrg001 <katharina.irrgang@googlemail.com> * Bump amperize to version 0.3.8 no issue * Bump mysql to version 2.16.0 no issue - mysql 2.15.0 uses a deprecated notation for timers - e.g. timers.unenroll() * Bump sub dependencies no issue - e.g. knex-migrator used mysql 2.15.0 * Bump dependencies no issue * Replaced `new Buffer` with `Buffer.from` no issue - Buffer() is deprecated due to security and usability issues. - https://nodejs.org/en/docs/guides/buffer-constructor-deprecation/
This commit is contained in:
parent
7d9e2a21ad
commit
7fb0b96f3e
@ -11,7 +11,7 @@ module.exports.generateFromContent = function generateFromContent(options) {
|
||||
hash.update(content);
|
||||
|
||||
text += [content, hash.digest('base64')].join('|');
|
||||
return new Buffer(text).toString('base64');
|
||||
return Buffer.from(text).toString('base64');
|
||||
};
|
||||
|
||||
module.exports.generateFromEmail = function generateFromEmail(options) {
|
||||
@ -29,7 +29,7 @@ module.exports.generateFromEmail = function generateFromEmail(options) {
|
||||
hash.update(String(secret));
|
||||
|
||||
text += [expires, email, hash.digest('base64')].join('|');
|
||||
return new Buffer(text).toString('base64');
|
||||
return Buffer.from(text).toString('base64');
|
||||
};
|
||||
|
||||
module.exports.resetToken = {
|
||||
@ -49,13 +49,13 @@ module.exports.resetToken = {
|
||||
hash.update(String(dbHash));
|
||||
|
||||
text += [expires, email, hash.digest('base64')].join('|');
|
||||
return new Buffer(text).toString('base64');
|
||||
return Buffer.from(text).toString('base64');
|
||||
},
|
||||
extract: function extract(options) {
|
||||
options = options || {};
|
||||
|
||||
var token = options.token,
|
||||
tokenText = new Buffer(token, 'base64').toString('ascii'),
|
||||
tokenText = Buffer.from(token, 'base64').toString('ascii'),
|
||||
parts,
|
||||
expires,
|
||||
email;
|
||||
|
Loading…
Reference in New Issue
Block a user