Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Update base64 import #11784

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/BasePlatform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
limitations under the License.
*/

import { MatrixClient, MatrixEvent, Room, SSOAction } from "matrix-js-sdk/src/matrix";
import { encodeUnpaddedBase64 } from "matrix-js-sdk/src/crypto/olmlib";
import { MatrixClient, MatrixEvent, Room, SSOAction, encodeUnpaddedBase64 } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";

import dis from "./dispatcher/dispatcher";
Expand Down Expand Up @@ -421,7 +420,7 @@
} catch (e) {
return null;
}
return encodeUnpaddedBase64(randomArray);

Check failure on line 423 in src/BasePlatform.ts

View workflow job for this annotation

GitHub Actions / Jest

Lifecycle › restoreFromLocalStorage() › when session is found in storage › with a pickle key › should persist credentials

TypeError: (0 , _matrix.encodeUnpaddedBase64) is not a function at MockPlatform.createPickleKey (src/BasePlatform.ts:423:36) at setLoggedIn (src/Lifecycle.ts:707:15) at Object.<anonymous> (test/Lifecycle-test.ts:353:21)

Check failure on line 423 in src/BasePlatform.ts

View workflow job for this annotation

GitHub Actions / Jest

Lifecycle › restoreFromLocalStorage() › when session is found in storage › with a pickle key › should persist access token when idb is not available

TypeError: (0 , _matrix.encodeUnpaddedBase64) is not a function at MockPlatform.createPickleKey (src/BasePlatform.ts:423:36) at setLoggedIn (src/Lifecycle.ts:707:15) at Object.<anonymous> (test/Lifecycle-test.ts:353:21)

Check failure on line 423 in src/BasePlatform.ts

View workflow job for this annotation

GitHub Actions / Jest

Lifecycle › restoreFromLocalStorage() › when session is found in storage › with a pickle key › should create new matrix client with credentials

TypeError: (0 , _matrix.encodeUnpaddedBase64) is not a function at MockPlatform.createPickleKey (src/BasePlatform.ts:423:36) at setLoggedIn (src/Lifecycle.ts:707:15) at Object.<anonymous> (test/Lifecycle-test.ts:353:21)

Check failure on line 423 in src/BasePlatform.ts

View workflow job for this annotation

GitHub Actions / Jest

Lifecycle › restoreFromLocalStorage() › when session is found in storage › with a pickle key › with a refresh token › should persist credentials

TypeError: (0 , _matrix.encodeUnpaddedBase64) is not a function at MockPlatform.createPickleKey (src/BasePlatform.ts:423:36) at setLoggedIn (src/Lifecycle.ts:707:15) at Object.<anonymous> (test/Lifecycle-test.ts:353:21)

Check failure on line 423 in src/BasePlatform.ts

View workflow job for this annotation

GitHub Actions / Jest

Lifecycle › restoreFromLocalStorage() › when session is found in storage › with a pickle key › with a refresh token › should create new matrix client with credentials

TypeError: (0 , _matrix.encodeUnpaddedBase64) is not a function at MockPlatform.createPickleKey (src/BasePlatform.ts:423:36) at setLoggedIn (src/Lifecycle.ts:707:15) at Object.<anonymous> (test/Lifecycle-test.ts:353:21)

Check failure on line 423 in src/BasePlatform.ts

View workflow job for this annotation

GitHub Actions / Jest

Lifecycle › setLoggedIn() › should remove fresh login flag from session storage

TypeError: (0 , _matrix.encodeUnpaddedBase64) is not a function at MockPlatform.createPickleKey (src/BasePlatform.ts:423:36) at setLoggedIn (src/Lifecycle.ts:707:15) at Object.<anonymous> (test/Lifecycle-test.ts:491:13)

Check failure on line 423 in src/BasePlatform.ts

View workflow job for this annotation

GitHub Actions / Jest

Lifecycle › setLoggedIn() › should start matrix client

TypeError: (0 , _matrix.encodeUnpaddedBase64) is not a function at MockPlatform.createPickleKey (src/BasePlatform.ts:423:36) at setLoggedIn (src/Lifecycle.ts:707:15) at Object.<anonymous> (test/Lifecycle-test.ts:497:13)

Check failure on line 423 in src/BasePlatform.ts

View workflow job for this annotation

GitHub Actions / Jest

Lifecycle › setLoggedIn() › with a pickle key › creates a pickle key with userId and deviceId

TypeError: (0 , _matrix.encodeUnpaddedBase64) is not a function at MockPlatform.createPickleKey (src/BasePlatform.ts:423:36) at setLoggedIn (src/Lifecycle.ts:707:15) at Object.<anonymous> (test/Lifecycle-test.ts:584:17)

Check failure on line 423 in src/BasePlatform.ts

View workflow job for this annotation

GitHub Actions / Jest

Lifecycle › setLoggedIn() › with a pickle key › should persist credentials

TypeError: (0 , _matrix.encodeUnpaddedBase64) is not a function at MockPlatform.createPickleKey (src/BasePlatform.ts:423:36) at setLoggedIn (src/Lifecycle.ts:707:15) at Object.<anonymous> (test/Lifecycle-test.ts:590:17)

Check failure on line 423 in src/BasePlatform.ts

View workflow job for this annotation

GitHub Actions / Jest

Lifecycle › setLoggedIn() › with a pickle key › should persist token when encrypting the token fails

TypeError: (0 , _matrix.encodeUnpaddedBase64) is not a function at MockPlatform.createPickleKey (src/BasePlatform.ts:423:36) at setLoggedIn (src/Lifecycle.ts:707:15) at Object.<anonymous> (test/Lifecycle-test.ts:614:17)
}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/SecurityManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { DeviceVerificationStatus, ICryptoCallbacks, MatrixClient } from "matrix-js-sdk/src/matrix";
import { DeviceVerificationStatus, ICryptoCallbacks, MatrixClient, encodeBase64 } from "matrix-js-sdk/src/matrix";
import { ISecretStorageKeyInfo } from "matrix-js-sdk/src/crypto/api";
import { deriveKey } from "matrix-js-sdk/src/crypto/key_passphrase";
import { decodeRecoveryKey } from "matrix-js-sdk/src/crypto/recoverykey";
import { encodeBase64 } from "matrix-js-sdk/src/crypto/olmlib";
import { logger } from "matrix-js-sdk/src/logger";

import type CreateSecretStorageDialog from "./async-components/views/dialogs/security/CreateSecretStorageDialog";
Expand Down
Loading