File tree Expand file tree Collapse file tree 5 files changed +24
-26
lines changed
backingstore/better-sqlite3 Expand file tree Collapse file tree 5 files changed +24
-26
lines changed Original file line number Diff line number Diff line change 52
52
"@sentry/node" : " ^7.17.2" ,
53
53
"@sinclair/typebox" : " 0.34.13" ,
54
54
"@the-draupnir-project/interface-manager" : " 4.1.0" ,
55
- "@the-draupnir-project/matrix-basic-types" : " 1.3 .0" ,
55
+ "@the-draupnir-project/matrix-basic-types" : " 1.4 .0" ,
56
56
"@the-draupnir-project/mps-interface-adaptor" : " ^0.4.1" ,
57
57
"better-sqlite3" : " ^9.4.3" ,
58
58
"body-parser" : " ^1.20.2" ,
71
71
"overrides" : {
72
72
"matrix-bot-sdk" : " $@vector-im/matrix-bot-sdk" ,
73
73
"@vector-im/matrix-bot-sdk" : " npm:@vector-im/matrix-bot-sdk@^0.7.1-element.6" ,
74
- "@the-draupnir-project/matrix-basic-types" : " @ the-draupnir-project/matrix-basic-types@1.2.0 " ,
74
+ "@the-draupnir-project/matrix-basic-types" : " $ the-draupnir-project/matrix-basic-types" ,
75
75
"matrix-protection-suite" : " $matrix-protection-suite"
76
76
},
77
77
"engines" : {
Original file line number Diff line number Diff line change 9
9
10
10
import { isError , Ok , Result } from "@gnuxie/typescript-result" ;
11
11
import {
12
- roomIDServerName ,
13
12
StringRoomID ,
14
13
StringServerName ,
15
14
StringUserID ,
@@ -323,8 +322,7 @@ export class SqliteHashReversalStore
323
322
( room_id : StringRoomID , sha256 ) => ( { room_id, sha256 } ) ,
324
323
( roomRecords ) => {
325
324
this . emit ( "ReversedHashes" , roomRecords , [ ] , [ ] ) ;
326
- } ,
327
- ( roomRecord ) => roomIDServerName ( roomRecord . room_id )
325
+ }
328
326
) ;
329
327
}
330
328
Original file line number Diff line number Diff line change 3
3
// SPDX-License-Identifier: Apache-2.0
4
4
5
5
import { isError , Ok , Result } from "@gnuxie/typescript-result" ;
6
- import {
7
- roomIDServerName ,
8
- StringRoomID ,
9
- } from "@the-draupnir-project/matrix-basic-types" ;
6
+ import { StringRoomID } from "@the-draupnir-project/matrix-basic-types" ;
10
7
import {
11
8
Logger ,
12
9
RoomBasicDetails ,
@@ -76,19 +73,9 @@ export class StandardDiscoveredRoomStore
76
73
if ( details . creator === undefined ) {
77
74
continue ; // no point persisting details that don't have a creator.
78
75
}
79
- const storeResult = await this . hashStore . storeRoomIdentification ( {
80
- creator : details . creator ,
81
- roomID : details . room_id ,
82
- server : roomIDServerName ( details . room_id ) ,
83
- } ) ;
84
- if ( isError ( storeResult ) ) {
85
- log . error (
86
- "Error storing room details for a room" ,
87
- roomID ,
88
- details ,
89
- storeResult
90
- ) ;
91
- }
76
+ // TODO: normally we would store details about the room, such as the creator,
77
+ // and the server, but currently this is unviable.
78
+ // https://matrix.org/blog/2025/07/security-predisclosure/
92
79
}
93
80
return Ok ( discoveredRooms ) ;
94
81
}
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ describe("meow", function () {
89
89
const bannedServer = StringServerName ( "banned.example.com" ) ;
90
90
const roomBannedViaServer = StringRoomID ( "!banned:banned.example.com" ) ;
91
91
const policyRoom = randomRoomID ( [ ] ) ;
92
+ const roomCreator = StringUserID ( "@creator:banned.example.com" ) ;
92
93
const bannedServerHash = base64sha256 ( bannedServer ) ;
93
94
const findResult = ( await store . findServerHash ( bannedServerHash ) ) . expect (
94
95
"Should be able to at least query this"
@@ -118,6 +119,18 @@ describe("meow", function () {
118
119
( await store . storeUndiscoveredRooms ( [ roomBannedViaServer ] ) ) . expect (
119
120
"Should be able to discover rooms jsut fine"
120
121
) ;
122
+ // previously storing an undiscovered room would extract the server name.
123
+ // this is no longer possible to do indirectly https://matrix.org/blog/2025/07/security-predisclosure/.
124
+ (
125
+ await store . storeRoomIdentification ( {
126
+ roomID : roomBannedViaServer ,
127
+ creator : roomCreator ,
128
+ server : bannedServer ,
129
+ } )
130
+ ) . expect ( "Should be able to store identification for the room" ) ;
131
+ ( await store . storeUndiscoveredUsers ( [ roomCreator ] ) ) . expect (
132
+ "Should be able to store the creator of the room"
133
+ ) ;
121
134
const foundHash = ( await store . findServerHash ( bannedServerHash ) ) . expect (
122
135
"Should be able to now find the server hash from the room we discovered"
123
136
) ;
Original file line number Diff line number Diff line change 319
319
" @gnuxie/super-cool-stream" " ^0.2.1"
320
320
" @gnuxie/typescript-result" " ^1.0.0"
321
321
322
- " @the-draupnir-project/matrix-basic-types@1.3 .0 " :
323
- version "1.3 .0"
324
- resolved "https://registry.yarnpkg.com/@the-draupnir-project/matrix-basic-types/-/matrix-basic-types-1.3 .0.tgz#02fa9bd75eeed778a57da0844447feca3a4c663c "
325
- integrity sha512-WkUD7cqs9qFr1NQZiJWxa+/1trWrhQqv8SbPxrMLRKv1LMm93ELeguROP470kHNWHrCkVcKmYQVc4uC2Yup+EQ ==
322
+ " @the-draupnir-project/matrix-basic-types@1.4 .0 " :
323
+ version "1.4 .0"
324
+ resolved "https://registry.yarnpkg.com/@the-draupnir-project/matrix-basic-types/-/matrix-basic-types-1.4 .0.tgz#18fcfc7561ad495f4868ef4298131a3e20e7d946 "
325
+ integrity sha512-nKK9vmAXh87VwaANvlNlUaq/rIu50VcdRXfoPJB99RqY4dt6iXRu/1b8mQJ5rDCK4yun/4IyGexw6FVQAqT58Q ==
326
326
dependencies :
327
327
" @gnuxie/typescript-result" " ^1.0.0"
328
328
glob-to-regexp "^0.4.1"
You can’t perform that action at this time.
0 commit comments