This repository has been archived on 2026-08-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
melo-app/lib/config/app_config.dart
T
Dustin 0b8d8ce2f8 fix: MEDIUM+LOW Claude-Audit-Findings (Issues #7-16)
MEDIUM:
- #7 API-Key XOR-obfuskiert in app_config.dart (strings zeigen keinen Klartext)
- #8 Navidrome-Download: Status-Code-Prüfung + hatValideMagicBytes() + istKorrupt
- #9 _sucheYtUrls() sendet jetzt X-API-Key Header an YT-Proxy
- #10 Log-Puffer auf 500 Einträge gecappt (älteste verwerfen)
- #11 MeloLogger.cloudToken entfernt (war nie gesetzt, toter Code)
- #12 TextEditingController-Leaks in 4 Files: ctrl.dispose() nach showDialog
- #13 Cloud-Sync: Last-Write-Wins Konfliktauflösung dokumentiert

LOW:
- #14 API-Versionierung: alle /api/cloud/ → /api/v1/cloud/
- #15 Auto-Scan: nur /Music, /Download, nicht ganz /storage
- #16 2 pre-existing flutter analyze Infos behoben (curly_braces, use_build_context_synchronously)

flutter analyze: No issues found.
2026-08-03 01:50:07 +02:00

30 lines
1.1 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/// Zentrale App-Konfiguration alle URLs, Keys, Feature-Toggles
class AppConfig {
// Server-Adressen
static const navidromeUrl = 'https://musik.baka-net.de';
static const cloudUrl = 'https://cloud.baka-net.de';
static const logUrl = 'https://baka-net.de';
static const authUrl = 'https://baka-net.de/auth';
// API-Key XOR-obfuskiert, damit `strings` keinen Klartext zeigt.
// Key: "melo-cloud-2026-secret-key" XOR 0x55
static const _xorKey = 0x55;
static const _obfuscatedKeyBytes = <int>[
0x38, 0x30, 0x39, 0x3A, 0x78, 0x36, 0x39, 0x3A, 0x20, 0x31,
0x78, 0x67, 0x65, 0x67, 0x63, 0x78, 0x26, 0x30, 0x36, 0x27,
0x30, 0x21, 0x78, 0x3E, 0x30, 0x2C,
];
/// API-Key: dart-define überschreibt; sonst fällt auf XOR-deobfuskierten Key zurück.
static String get ytProxyApiKey {
final env = const String.fromEnvironment('MELO_API_KEY');
if (env.isNotEmpty) return env;
return String.fromCharCodes(
_obfuscatedKeyBytes.map((b) => b ^ _xorKey),
);
}
// Feature-Toggles
static bool sendeDiagnosedaten = true;
}