kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix: channel PSK validation
rodzic
35364a6685
commit
1691acb59d
|
@ -98,7 +98,8 @@ fun EditChannelDialog(
|
|||
try {
|
||||
pskString = it // empty (no crypto), 128 or 256 bit only
|
||||
val decoded = Base64.decode(it, base64Flags).toByteString()
|
||||
if (decoded.size() in setOf(0, 16, 32)) pskInput = decoded
|
||||
val fullPsk = Channel(channelSettings { psk = decoded }).psk
|
||||
if (fullPsk.size() in setOf(0, 16, 32)) pskInput = decoded
|
||||
} catch (ex: Throwable) {
|
||||
// Base64 decode failed, pskError true
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue