mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-02 17:29:34 +01:00
Merge branch 'soru/no-empty-ssss-passphrase' into 'main'
fix: Don't allow an empty ssss passphrase in key verification See merge request famedly/fluffychat!326
This commit is contained in:
commit
116c6f5669
@ -67,7 +67,7 @@ class _KeyVerificationPageState extends State<KeyVerificationDialog> {
|
|||||||
final textEditingController = TextEditingController();
|
final textEditingController = TextEditingController();
|
||||||
String input;
|
String input;
|
||||||
final checkInput = () async {
|
final checkInput = () async {
|
||||||
if (input == null) {
|
if (input == null || input.isEmpty) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final valid = await showFutureLoadingDialog(
|
final valid = await showFutureLoadingDialog(
|
||||||
@ -77,15 +77,10 @@ class _KeyVerificationPageState extends State<KeyVerificationDialog> {
|
|||||||
await Future.delayed(Duration(milliseconds: 100));
|
await Future.delayed(Duration(milliseconds: 100));
|
||||||
var valid = false;
|
var valid = false;
|
||||||
try {
|
try {
|
||||||
await widget.request.openSSSS(recoveryKey: input);
|
await widget.request.openSSSS(keyOrPassphrase: input);
|
||||||
valid = true;
|
valid = true;
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
try {
|
valid = false;
|
||||||
await widget.request.openSSSS(passphrase: input);
|
|
||||||
valid = true;
|
|
||||||
} catch (_) {
|
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return valid;
|
return valid;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user