fix: scope server pins by port (fumi-core rev 1468f3c)
This commit is contained in:
parent
996e879509
commit
7d2a147fec
16 changed files with 109 additions and 79 deletions
|
|
@ -144,7 +144,7 @@ class SmolClient {
|
|||
// registration and fetching demand it anyway (sec 4), so restoring is
|
||||
// stopped at the pin step rather than letting the account bind to a
|
||||
// server whose key nobody verified.
|
||||
if (store.serverPin(addr.host) == null) {
|
||||
if (store.serverPin(addr.host, addr.port) == null) {
|
||||
throw SmolError("no pinned key for ${addr.host}. Obtain it from the "
|
||||
"operator through a trusted channel, then pin it in settings.");
|
||||
}
|
||||
|
|
@ -157,7 +157,8 @@ class SmolClient {
|
|||
}
|
||||
}
|
||||
|
||||
void pinServer(String host, String keyB32) => store.pinServer(host, keyB32);
|
||||
void pinServer(String host, String keyB32, int port) =>
|
||||
store.pinServer(host, keyB32, port);
|
||||
|
||||
Future<void> registerAccount(String addressText, {String token = ""}) async {
|
||||
final addr = parseAddress(addressText);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue