From f8f29c280dc3ad636cd9d8eaae65af449ac28b97 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 2 Feb 2023 12:19:10 +0100 Subject: [PATCH] update my blog post on matrix room de-ciphering --- README.md | 12 +++--- ...rate-encrypted-room-to-a-clear-text-one.md | 40 ++++++++++++++----- index.html | 17 ++++++-- 3 files changed, 49 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 89ad556..6d9798d 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ # My Blog +```bash +nix-shell -p jekyll rubyPackages.sass +jekyll build +source ~/.awsrc +aws s3 sync _site/ s3://quentin.dufour.io/ ``` -echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p -RUBYOPT=--disable-did_you_mean bundle install -bundle exec jekyll serve -mc mirror --overwrite _site garage/quentin.dufour.io -``` - -test diff --git a/_posts/2022-03-24-matrix-migrate-encrypted-room-to-a-clear-text-one.md b/_posts/2022-03-24-matrix-migrate-encrypted-room-to-a-clear-text-one.md index 6636a10..beb99c2 100644 --- a/_posts/2022-03-24-matrix-migrate-encrypted-room-to-a-clear-text-one.md +++ b/_posts/2022-03-24-matrix-migrate-encrypted-room-to-a-clear-text-one.md @@ -42,16 +42,8 @@ First, you should inform your users with a message, something like: You will not be able to post new messages here, please follow the provided redirection to join the new room. Sorry for the inconvenience. -Now, open the developper tools in your old room by typing in the message box: - -``` -/devtools -``` - -*You can also open it by going in "Room Settings" -> "Advanced" -> "Open Devtools"* - -A window must appear. Click on "Send Custom Event". Then click on the red button "Event" to create a "State Event". -Put `m.room.tombstone` as the Event Type, keep the State Key field empty, and finally enter the following content (replace the example room ID by the one of your new room): +Now we will prepare a **state event** that point to the **new** room, create a file named `migration.json` +based on the following template: ```json { @@ -60,6 +52,34 @@ Put `m.room.tombstone` as the Event Type, keep the State Key field empty, and fi } ``` +This event must be sent in the **old** room. Let's say its identifier is `!MFnHRRrCTMeHvfnNUD:deuxfleurs.fr`. +The URL template is thus: + +``` +https://im.deuxfleurs.fr/_matrix/client/v3/rooms/!MFnHRRrCTMeHvfnNUD:deuxfleurs.fr/state/m.room.tombstone +``` + +The last thing we need is to build an header file containing the required information for authentication onto the API. +Create a file named `hdrs.txt` based on the following template. + +```text +Authorization: Bearer see_below_how_you_can_find_me +Content-Type: application/json +``` + +*The authorization header can be extracted from an Element Web instance by opening the developer panel (F12) and going to the Network tab. +Then select a request going to your matrix backend, on the right part of your screen search the "Authorization" line and copy/paste its value.* + +Finally you can send the request to the API by again adapting the following command template: + +```bash +curl \ + -H @hdrs.txt \ + -X PUT \ + -d @migration.json \ + 'https://im.deuxfleurs.fr/_matrix/client/v3/rooms/!MFnHRRrCTMeHvfnNUD:deuxfleurs.fr/state/m.room.tombstone' +``` + And that's all, you have migrated your old encrypted room to a new clear text one! If you want to explore all the possibilities offered by the developer tools, you can read [Matrix specification](https://spec.matrix.org/). diff --git a/index.html b/index.html index 86caed6..d8a3f44 100644 --- a/index.html +++ b/index.html @@ -12,8 +12,9 @@ layout: default

Je suis ingénieur en informatique et libriste. J'ai travaillé sur Tor pendant ma thèse. - Depuis, j'ai cofondé Deuxfleurs, un hébergeur associatif expérimental pour lequel je travaille. - Nous développons des logiciels pour faciliter l'auto-hébergement comme Garage, une solution de stockage de données distribuée. + Je suis membre de Deuxfleurs, un hébergeur associatif expérimental. + Nous développons des logiciels libres comme Garage pour un monde plus résilient et souverain. + Le reste du temps, je suis disponible pour vous accompagner sur vos projet informatiques en freelance, écrivez-moi !