fix: Seahorse does not properly work on many Linux devices
- stop use of `flutter_secure_storage` for Linux in favor of unencrypted storage Unlike many other platforms, many Linux distributions have built-in support for FDE or home directory encryption. As long as `flutter_secure_storage` makes FluffyChat useles on many Linuxes, this seems to be the only solution until they stop using Seahorse. Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
This commit is contained in:
parent
531f43d42a
commit
d5a0d68a33
8 changed files with 25 additions and 11 deletions
|
|
@ -40,6 +40,8 @@ class FlutterFluffyBoxDatabase extends FluffyBoxDatabase {
|
|||
final containsEncryptionKey =
|
||||
await secureStorage.containsKey(key: _cipherStorageKey);
|
||||
if (!containsEncryptionKey) {
|
||||
// do not try to create a buggy secure storage for new Linux users
|
||||
if (Platform.isLinux) throw MissingPluginException();
|
||||
final key = Hive.generateSecureKey();
|
||||
await secureStorage.write(
|
||||
key: _cipherStorageKey,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class FlutterMatrixHiveStore extends FamedlySdkHiveDatabase {
|
|||
HiveCipher hiverCipher;
|
||||
try {
|
||||
// Workaround for secure storage is calling Platform.operatingSystem on web
|
||||
if (kIsWeb) throw MissingPluginException();
|
||||
if (kIsWeb || Platform.isLinux) throw MissingPluginException();
|
||||
|
||||
const secureStorage = FlutterSecureStorage();
|
||||
final containsEncryptionKey =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue