Skip to content

Commit

Permalink
Use Buffer.from() instead of deprecated new Buffer()
Browse files Browse the repository at this point in the history
Resolves: #238
  • Loading branch information
pixtron committed Feb 17, 2020
1 parent d6df43b commit d84dbe6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Display a meaningful error message if login fails with EPERM #161
* New tray behaviour for linux #207
* Improve sync error messages displayed to users #216
* Use Buffer.from() instead of deprecated new Buffer() #238


## 1.2.1
Expand Down
4 changes: 2 additions & 2 deletions app/lib/auth/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ module.exports = function(env, clientConfig) {
headers: {
'X-Client': ['Balloon-Desktop-App', globalConfig.get('version'), os.hostname()].join('|'),
'User-Agent': ['Balloon-Desktop-App', globalConfig.get('version'), os.hostname(), os.platform(), os.release()].join('|'),
'Authorization': 'Basic ' + new Buffer('balloon-client-desktop:').toString('base64')
'Authorization': 'Basic ' + Buffer.from('balloon-client-desktop:').toString('base64')
},
form: body,
json: true,
Expand Down Expand Up @@ -308,7 +308,7 @@ module.exports = function(env, clientConfig) {
headers: {
'X-Client': ['Balloon-Desktop-App', globalConfig.get('version'), os.hostname()].join('|'),
'User-Agent': ['Balloon-Desktop-App', globalConfig.get('version'), os.hostname(), os.platform(), os.release()].join('|'),
'Authorization': 'Basic ' + new Buffer('balloon-client-desktop:').toString('base64')
'Authorization': 'Basic ' + Buffer.from('balloon-client-desktop:').toString('base64')
},
body: {
refresh_token: secret,
Expand Down

0 comments on commit d84dbe6

Please sign in to comment.