Skip to content

Commit bff2b73

Browse files
toger5hughns
andauthored
Bump matrix-js-sdk to v36.1.0 (#2967)
Co-authored-by: Hugh Nimmo-Smith <[email protected]>
1 parent 1dde54d commit bff2b73

File tree

7 files changed

+18
-17
lines changed

7 files changed

+18
-17
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"livekit-client": "^2.5.7",
9191
"lodash-es": "^4.17.21",
9292
"loglevel": "^1.9.1",
93-
"matrix-js-sdk": "matrix-org/matrix-js-sdk#develop",
93+
"matrix-js-sdk": "^36.1.0",
9494
"matrix-widget-api": "^1.10.0",
9595
"normalize.css": "^8.0.1",
9696
"observable-hooks": "^4.2.3",

src/auth/useRecaptcha.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
66
*/
77

88
import { useEffect, useCallback, useRef, useState } from "react";
9-
import { randomString } from "matrix-js-sdk/src/randomstring";
9+
import { secureRandomString } from "matrix-js-sdk/src/randomstring";
1010
import { useTranslation } from "react-i18next";
1111
import { logger } from "matrix-js-sdk/src/logger";
1212

@@ -31,7 +31,7 @@ export function useRecaptcha(sitekey?: string): {
3131
recaptchaId: string;
3232
} {
3333
const { t } = useTranslation();
34-
const [recaptchaId] = useState(() => randomString(16));
34+
const [recaptchaId] = useState(() => secureRandomString(16));
3535
const promiseRef = useRef<RecaptchaPromiseRef | undefined>(undefined);
3636

3737
useEffect(() => {

src/auth/useRegisterPasswordlessUser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
66
*/
77

88
import { useCallback } from "react";
9-
import { randomString } from "matrix-js-sdk/src/randomstring";
9+
import { secureRandomString } from "matrix-js-sdk/src/randomstring";
1010

1111
import { useClient } from "../ClientContext";
1212
import { useInteractiveRegistration } from "../auth/useInteractiveRegistration";
@@ -42,7 +42,7 @@ export function useRegisterPasswordlessUser(): UseRegisterPasswordlessUserType {
4242
const userName = generateRandomName();
4343
const [client, session] = await register(
4444
userName,
45-
randomString(16),
45+
secureRandomString(16),
4646
displayName,
4747
recaptchaResponse,
4848
true,

src/home/UnauthenticatedView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
66
*/
77

88
import { type FC, useCallback, useState, type FormEventHandler } from "react";
9-
import { randomString } from "matrix-js-sdk/src/randomstring";
9+
import { secureRandomString } from "matrix-js-sdk/src/randomstring";
1010
import { Trans, useTranslation } from "react-i18next";
1111
import { Button, Heading, Text } from "@vector-im/compound-web";
1212
import { logger } from "matrix-js-sdk/src/logger";
@@ -67,7 +67,7 @@ export const UnauthenticatedView: FC = () => {
6767
const userName = generateRandomName();
6868
const [client, session] = await register(
6969
userName,
70-
randomString(16),
70+
secureRandomString(16),
7171
displayName,
7272
recaptchaResponse,
7373
true,

src/settings/FeedbackSettingsTab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
66
*/
77

88
import { type ChangeEvent, type FC, useCallback } from "react";
9-
import { randomString } from "matrix-js-sdk/src/randomstring";
9+
import { secureRandomString } from "matrix-js-sdk/src/randomstring";
1010
import { Trans, useTranslation } from "react-i18next";
1111
import { Button, Text } from "@vector-im/compound-web";
1212
import { logger } from "matrix-js-sdk/src/logger";
@@ -36,7 +36,7 @@ export const FeedbackSettingsTab: FC<Props> = ({ roomId }) => {
3636
const description =
3737
typeof descriptionData === "string" ? descriptionData : "";
3838
const sendLogs = Boolean(data.get("sendLogs"));
39-
const rageshakeRequestId = randomString(16);
39+
const rageshakeRequestId = secureRandomString(16);
4040

4141
submitRageshake({
4242
description,

src/settings/rageshake.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Please see LICENSE in the repository root for full details.
3030
import EventEmitter from "events";
3131
import { throttle } from "lodash-es";
3232
import { type Logger, logger } from "matrix-js-sdk/src/logger";
33-
import { randomString } from "matrix-js-sdk/src/randomstring";
33+
import { secureRandomString } from "matrix-js-sdk/src/randomstring";
3434
import { type LoggingMethod } from "loglevel";
3535

3636
import type loglevel from "loglevel";
@@ -128,7 +128,7 @@ class IndexedDBLogStore {
128128
private indexedDB: IDBFactory,
129129
private loggerInstance: ConsoleLogger,
130130
) {
131-
this.id = "instance-" + randomString(16);
131+
this.id = "instance-" + secureRandomString(16);
132132

133133
loggerInstance.on(ConsoleLoggerEvent.Log, this.onLoggerLog);
134134
window.addEventListener("beforeunload", () => {

yarn.lock

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6317,9 +6317,10 @@ [email protected]:
63176317
resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd"
63186318
integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA==
63196319

6320-
matrix-js-sdk@matrix-org/matrix-js-sdk#develop:
6321-
version "35.1.0"
6322-
resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/9134471dc72a14b29eb207f1c5ef207521f40bd3"
6320+
matrix-js-sdk@^36.1.0:
6321+
version "36.1.0"
6322+
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-36.1.0.tgz#3685a85c0c1adf4e2c3622bce76c11430963f23d"
6323+
integrity sha512-KNPswMSAGKDxBybJedxRpWadaRes9paxmjTCUsQT8t1Jg3ZENraAt6ynIaxh6PxazAH9D5ly6EYKHaLMLbZ1Dg==
63236324
dependencies:
63246325
"@babel/runtime" "^7.12.5"
63256326
"@matrix-org/matrix-sdk-crypto-wasm" "^12.1.0"
@@ -6338,9 +6339,9 @@ matrix-js-sdk@matrix-org/matrix-js-sdk#develop:
63386339
uuid "11"
63396340

63406341
matrix-widget-api@^1.10.0:
6341-
version "1.11.0"
6342-
resolved "https://registry.yarnpkg.com/matrix-widget-api/-/matrix-widget-api-1.11.0.tgz#2f548b11a7c0df789d5d4fdb5cc9ef7af8aef3da"
6343-
integrity sha512-ED/9hrJqDWVLeED0g1uJnYRhINh3ZTquwurdM+Hc8wLVJIQ8G/r7A7z74NC+8bBIHQ1Jo7i1Uq5CoJp/TzFYrA==
6342+
version "1.13.0"
6343+
resolved "https://registry.yarnpkg.com/matrix-widget-api/-/matrix-widget-api-1.13.0.tgz#40344b264b08d6d98ab9d547a41eb74dd6d8c3f7"
6344+
integrity sha512-+LrvwkR1izL4h2euX8PDrvG/3PZZDEd6As+lmnR3jAVwbFJtU5iTnwmZGnCca9ddngCvXvAHkcpJBEPyPTZneQ==
63446345
dependencies:
63456346
"@types/events" "^3.0.0"
63466347
events "^3.2.0"

0 commit comments

Comments
 (0)