Security-Fixes aus dem flutter-security Audit

CRIT:
- Cloud-Token jetzt in flutter_secure_storage (Keystore/Keychain) statt SharedPreferences, mit Migration alter Eintraege
- usesCleartextTraffic entfernt (kein HTTP-Klartext mehr)
HIGH:
- Path-Traversal gefixt: p.basename bei YouTube-Download, Navidrome-Download und Cloud-Auto-Sync
MED:
- allowBackup=false (kein Backup von Token-Daten)
- Navidrome-Salt kryptographisch sicher (Random.secure statt Timestamp)
This commit is contained in:
Hermes (Server)
2026-08-01 13:10:18 +02:00
parent 8b6a04ead8
commit 77a20422be
5 changed files with 45 additions and 17 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:path/path.dart' as p;
import '../database/db_helper.dart';
import '../services/player_service.dart';
import '../services/musik_scanner.dart';
@@ -309,7 +310,7 @@ class MeloHomeViewModel extends ChangeNotifier {
.map((f) => f.path.split('/').last).toSet();
for (final s in serverSongs) {
final title = s['title'].toString();
final title = p.basename(s['title'].toString());
if (localFiles.contains(title)) continue; // schon lokal
await cloud.download(s['id'].toString(), '${dir.path}/$title');
}