mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Change Buffer to Buffer.alloc on Node v12. Try to fix Snap.
This commit is contained in:
parent
5bece0dd1e
commit
e01f4dbf13
8 changed files with 29 additions and 24 deletions
|
|
@ -286,14 +286,14 @@ export default class LDAP {
|
|||
if (attribute) {
|
||||
filter = new this.ldapjs.filters.EqualityFilter({
|
||||
attribute,
|
||||
value: new Buffer(id, 'hex'),
|
||||
value: new Buffer.alloc(id, 'hex'),
|
||||
});
|
||||
} else {
|
||||
const filters = [];
|
||||
Unique_Identifier_Field.forEach((item) => {
|
||||
filters.push(new this.ldapjs.filters.EqualityFilter({
|
||||
attribute: item,
|
||||
value : new Buffer(id, 'hex'),
|
||||
value : new Buffer.alloc(id, 'hex'),
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -131,9 +131,9 @@ var getTokenContent = function (token) {
|
|||
if (token) {
|
||||
try {
|
||||
var parts = token.split('.');
|
||||
var header = JSON.parse(new Buffer(parts[0], 'base64').toString());
|
||||
content = JSON.parse(new Buffer(parts[1], 'base64').toString());
|
||||
var signature = new Buffer(parts[2], 'base64');
|
||||
var header = JSON.parse(new Buffer.alloc(parts[0], 'base64').toString());
|
||||
content = JSON.parse(new Buffer.alloc(parts[1], 'base64').toString());
|
||||
var signature = new Buffer.alloc(parts[2], 'base64');
|
||||
var signed = parts[0] + '.' + parts[1];
|
||||
} catch (err) {
|
||||
this.content = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue