mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Correctly extract string data for password.
btoa expects a string argument, so when passing it the ArrayBuffer object returned by getRandomBytes(), it's converted to a string by calling .toString() on it. This always results in "[object ArrayBuffer]", effectively resulting in a completely non-random password.
This commit is contained in:
@@ -24,7 +24,7 @@ $('#number').on('change', function() {//TODO
|
||||
|
||||
var single_device = false;
|
||||
var signaling_key = getRandomBytes(32 + 20);
|
||||
var password = btoa(getRandomBytes(16));
|
||||
var password = btoa(getString(getRandomBytes(16)));
|
||||
password = password.substring(0, password.length - 2);
|
||||
|
||||
$('#init-go-single-client').click(function() {
|
||||
|
||||
Reference in New Issue
Block a user