fix: scope server pins by port (fumi-core rev 1468f3c)

This commit is contained in:
randogoth 2026-09-30 08:52:57 +03:00
parent 996e879509
commit 7d2a147fec
16 changed files with 109 additions and 79 deletions

View file

@ -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);