Refactoring - Part 1
1. Konfiguration extrahiert (config.py)
- Alle App-Einstellungen zentralisiert
- Flask-Konfiguration, Datenbank, Backup, Rate-Limiting
- 576 Zeilen Code reduziert
2. Datenbank-Layer (db.py)
- Connection Management mit Context Managers
- Helper-Funktionen für Queries
- Saubere Fehlerbehandlung
3. Auth-Module (auth/)
- decorators.py - Login-Required mit Session-Timeout
- password.py - Bcrypt Hashing
- two_factor.py - TOTP, QR-Codes, Backup-Codes
- rate_limiting.py - IP-Blocking, Login-Versuche
4. Utility-Module (utils/)
- audit.py - Audit-Logging
- backup.py - Verschlüsselte Backups
- license.py - Lizenzschlüssel-Generierung
- export.py - Excel-Export
- network.py - IP-Ermittlung
- recaptcha.py - reCAPTCHA-Verifikation
5. Models (models.py)
- User-Model-Funktionen
Dieser Commit ist enthalten in:
@@ -62,7 +62,8 @@
|
||||
"Bash(/home/rac00n/.npm-global/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg -n \"Dashboard\" /mnt/c/Users/Administrator/Documents/GitHub/v2-Docker/v2_adminpanel/templates/profile.html /mnt/c/Users/Administrator/Documents/GitHub/v2-Docker/v2_adminpanel/templates/resource_metrics.html)",
|
||||
"Bash(/home/rac00n/.npm-global/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg -n \"BACKUP|LOGIN_2FA_SUCCESS\" /mnt/c/Users/Administrator/Documents/GitHub/v2-Docker/v2_adminpanel/app.py)",
|
||||
"Bash(sed:*)",
|
||||
"Bash(python:*)"
|
||||
"Bash(python:*)",
|
||||
"Bash(awk:*)"
|
||||
],
|
||||
"deny": []
|
||||
}
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren