Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade/element web v1.11.28 conflicts solved #521

Merged
merged 21 commits into from
Apr 4, 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
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
Changes in [1.11.28](https://github.com/vector-im/element-web/releases/tag/v1.11.28) (2023-03-31)
=================================================================================================

## 🐛 Bug Fixes
* (No changes, version bumped to sync with element-desktop.)

Changes in [1.11.27](https://github.com/vector-im/element-web/releases/tag/v1.11.27) (2023-03-31)
=================================================================================================

## 🐛 Bug Fixes
* Fix detection of encryption for all users in a room ([\#10487](https://github.com/matrix-org/matrix-react-sdk/pull/10487)). Fixes #24995.

Changes in [1.11.26](https://github.com/vector-im/element-web/releases/tag/v1.11.26) (2023-03-28)
=================================================================================================

## 🔒 Security
* Fixes for [CVE-2023-28427](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-28427) / GHSA-mwq8-fjpf-c2gr
* Fixes for [CVE-2023-28103](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-28103) / GHSA-6g43-88cp-w5gv

Changes in [1.11.25](https://github.com/vector-im/element-web/releases/tag/v1.11.25) (2023-03-15)
=================================================================================================

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "element-web",
"productName": "Tchap",
"version": "4.2.1-1.11.25",
"version": "4.2.2-1.11.28",
"description": "A feature-rich client for Matrix.org",
"author": "DINUM",
"repository": {
Expand Down Expand Up @@ -78,8 +78,8 @@
"gfm.css": "^1.1.2",
"jsrsasign": "^10.5.25",
"katex": "^0.16.0",
"matrix-js-sdk": "23.5.0",
"matrix-react-sdk": "3.68.0",
"matrix-js-sdk": "24.0.0",
"matrix-react-sdk": "3.69.1",
"matrix-widget-api": "^1.1.1",
"prop-types": "^15.7.2",
"react": "17.0.2",
Expand Down
2,224 changes: 0 additions & 2,224 deletions patches/aaa-r2-js/matrix-js-sdk+23.5.0.patch

This file was deleted.

476 changes: 0 additions & 476 deletions patches/aaa-r2-react/matrix-react-sdk+3.68.0.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git a/node_modules/matrix-js-sdk/src/client.ts b/node_modules/matrix-js-sdk/src/client.ts
index 708abd3..369d221 100644
--- a/node_modules/matrix-js-sdk/src/client.ts
+++ b/node_modules/matrix-js-sdk/src/client.ts
@@ -20,6 +20,7 @@ limitations under the License.

import { Optional } from "matrix-events-sdk";

+
import type { IDeviceKeys, IMegolmSessionData, IOneTimeKey } from "./@types/crypto";
import { ISyncStateData, SyncApi, SyncApiOptions, SyncState } from "./sync";
import {
@@ -208,6 +209,9 @@ import { CryptoBackend } from "./common-crypto/CryptoBackend";
import { RUST_SDK_STORE_PREFIX } from "./rust-crypto/constants";
import { DeviceInfoMap } from "./crypto/DeviceList";

+import TchapUIFeature from '../../../src/util/TchapUIFeature'; // :TCHAP:
+
+
export type Store = IStore;

export type ResetTimelineCallback = (roomId: string) => boolean;
@@ -7183,6 +7187,17 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
const response = await this.getVersions();
if (!response) return false;
const unstableFeatures = response["unstable_features"];
+
+ // :TCHAP: disable cross signing if needed, by pretending the server doesn't support it.
+ console.log('TCHAP server versions', response);
+ if (!TchapUIFeature.isCrossSigningAndSecureStorageActive()) {
+ unstableFeatures["org.matrix.e2e_cross_signing"] = false;
+ }
+ if (feature === "org.matrix.e2e_cross_signing") {
+ console.info(':TCHAP: doesServerSupportUnstableFeature org.matrix.e2e_cross_signing', unstableFeatures);
+ }
+ // end :TCHAP:
+
return unstableFeatures && !!unstableFeatures[feature];
}

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ index 9946aa3..8cf51ed 100644

export interface UploadProgress {
diff --git a/node_modules/matrix-js-sdk/src/sync.ts b/node_modules/matrix-js-sdk/src/sync.ts
index 057ee15..1ea95f3 100644
index 3fa3616..72cc65e 100644
--- a/node_modules/matrix-js-sdk/src/sync.ts
+++ b/node_modules/matrix-js-sdk/src/sync.ts
@@ -610,6 +610,14 @@ export class SyncApi {
Expand Down
50 changes: 6 additions & 44 deletions patches/patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@
"package": "matrix-react-sdk",
"files": ["src/utils/MultiInviter.ts"]
},
"activate-cross-signing-and-secure-storage-js": {
"comments": "introduce a feature flag for activating cross signing and secure storage",
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/433",
"package": "matrix-js-sdk",
"files": ["src/client.ts"]
},
"activate-cross-signing-and-secure-storage-react": {
"comments": "introduce a feature flag for activating cross signing and secure storage (unify previous patches)",
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/433",
Expand Down Expand Up @@ -190,50 +196,6 @@
"src/components/views/settings/CryptographyPanel.tsx"
]
},
"aaa-r2-js": {
"package": "matrix-js-sdk",
"files": [
"src/@types/read_receipts.ts",
"src/ToDeviceMessageQueue.ts",
"src/client.ts",
"src/crypto/DeviceList.ts",
"src/crypto/EncryptionSetup.ts",
"src/crypto/OutgoingRoomKeyRequestManager.ts",
"src/crypto/SecretStorage.ts",
"src/crypto/algorithms/base.ts",
"src/crypto/algorithms/megolm.ts",
"src/crypto/backup.ts",
"src/crypto/index.ts",
"src/crypto/olmlib.ts",
"src/crypto/store/localStorage-crypto-store.ts",
"src/crypto/store/memory-crypto-store.ts",
"src/crypto/verification/request/ToDeviceChannel.ts",
"src/embedded.ts",
"src/models/read-receipt.ts",
"src/models/room.ts",
"src/store/index.ts",
"src/store/memory.ts",
"src/store/stub.ts",
"src/sync-accumulator.ts",
"src/sync.ts",
"src/utils.ts",
"src/webrtc/call.ts"
]
},
"aaa-r2-react": {
"package": "matrix-react-sdk",
"files": [
"src/components/structures/MessagePanel.tsx",
"src/components/views/dialogs/devtools/AccountData.tsx",
"src/languageHandler.tsx",
"src/modules/ModuleRunner.ts",
"src/settings/handlers/RoomDeviceSettingsHandler.ts",
"src/stores/AutoRageshakeStore.ts",
"src/stores/widgets/StopGapWidgetDriver.ts",
"src/stores/widgets/WidgetLayoutStore.ts",
"src/utils/device/clientInformation.ts"
]
},
"add-translations-for-server-errors": {
"github-issue": "https://github.com/tchapgouv/tchap-web-v4/issues/485",
"package": "matrix-react-sdk",
Expand Down
3 changes: 3 additions & 0 deletions scripts/tchap/install-yarn-linked-repositories.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ pushd matrix-js-sdk
yarn unlink # :TCHAP: for local build, undo previous links if present.
yarn link
yarn install --pure-lockfile
#remove problematic folder for our patches yarn-linked-dependencies/matrix-js-sdk/examples
rm -R examples/

popd

# :TCHAP: we don't use this.
Expand Down
7 changes: 6 additions & 1 deletion scripts/tchap/merge-patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function merge_patches() {
echo "# Manage $PATCH_PATH"

# Check if the package version exists and if the patch needs to be updated
# TODO : it would be better to keep patch even if the package version does not match to avoid unecessay patches commits
# EDIT : in github PR, the files appear as renamed without modifications
if [ "$PACKAGE_VERSION" == "null" ] || [[ "$PATCH_FILE" =~ "$PACKAGE_NAME+$PACKAGE_VERSION".patch ]]; then
echo "Package '$PACKAGE_NAME' not found in package.json or patch already up-to-date. Skipping patch update."
echo ""
Expand Down Expand Up @@ -67,6 +69,8 @@ function merge_patches() {
CONFLICTS_FOUND=true
else
# If there are no conflicts, generate a new patch file
# TODO : would it be nicer if we don't generate a new patch, but keep the old one to avoid unnecessary patches commit
# EDIT : in github PR, the files appear as renamed without modifications
yarn patch-package "$PACKAGE_NAME" >> $LOG_FILE 2>&1

# Move the new patch file to the old patch file's location
Expand Down Expand Up @@ -157,10 +161,11 @@ function continue_patches() {
fi

if [ "$CONFLICTS_FOUND" = false ]; then
# bug here, this condition can be true if we work only with one patch but there is more to fix
echo "All patches have been updated successfully."
# Remove the temporary directory
cd "$PROJECT_DIR"
clean_temp_dir
# clean_temp_dir
else
echo "Some patches still have conflicts. Resolve them and run the script again with the 'continue' command."
fi
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8962,10 +8962,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd"
integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA==

matrix-js-sdk@23.5.0:
version "23.5.0"
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-23.5.0.tgz#644a1546340160bfc3de44df30030373e7cc2fc9"
integrity sha512-jkHJBxXcLqzz0aZ4+Hjbx7hvgryIy+DZPOxvNfM2jJM0sc803Yyu4JMZLEdx/JLwFG1KE7bFZGiXP26g5yu6Mw==
matrix-js-sdk@24.0.0:
version "24.0.0"
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-24.0.0.tgz#cc08c55e6a88dcc177341705a8ff7cdfe93e0c27"
integrity sha512-AOhO036ziDf6lwYoauj5DES/RJ6RDTq+vrK2yO/GW/8n+bAXhkjWc9AA/WcTK/9SkNHS46ZanmolkhS1n8WniQ==
dependencies:
"@babel/runtime" "^7.12.5"
"@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.3"
Expand All @@ -8987,10 +8987,10 @@ matrix-mock-request@^2.5.0:
dependencies:
expect "^28.1.0"

matrix-react-sdk@3.68.0:
version "3.68.0"
resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.68.0.tgz#792435db0211377376509145dca2166ad5bb5a07"
integrity sha512-h+QSxVW8cz3GbJDAkcMq/jgXNzMjI1+mbttRtc0pVmzckjVDHyU6d5hzyzFakgvgFrv6LnRrtalU/mmMurrg2Q==
matrix-react-sdk@3.69.1:
version "3.69.1"
resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.69.1.tgz#bc1efcf51d0c003a9149686a994b64387ec6a45d"
integrity sha512-jOzZiWTlHclN+LTUyVH6FC950XUQ3aUUPyAkLvbRgo4On8pyC8jyMyvrowEQgrsOgYaflSI/DcX+B9RTnHDbcQ==
dependencies:
"@babel/runtime" "^7.12.5"
"@matrix-org/analytics-events" "^0.5.0"
Expand Down Expand Up @@ -9030,7 +9030,7 @@ [email protected]:
maplibre-gl "^2.0.0"
matrix-encrypt-attachment "^1.0.3"
matrix-events-sdk "0.0.1"
matrix-js-sdk "23.5.0"
matrix-js-sdk "24.0.0"
matrix-widget-api "^1.1.1"
minimist "^1.2.5"
opus-recorder "^8.0.3"
Expand Down