1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-12-12 11:18:05 +00:00

Added handling for missing flask-wtf dependency

Added CSRF protection (via flask-wtf)
Moved upload function to js file
Fixed error page in case of csrf failure
This commit is contained in:
Ozzie Isaacs
2021-10-04 17:50:32 +02:00
parent 5edde53fed
commit 50919d4721
25 changed files with 92 additions and 38 deletions

2
cps.py
View File

@@ -49,7 +49,7 @@ try:
from cps.kobo import kobo, get_kobo_activated
from cps.kobo_auth import kobo_auth
kobo_available = get_kobo_activated()
except ImportError:
except (ImportError, AttributeError): # Catch also error for not installed flask-wtf (missing csrf decorator)
kobo_available = False
try: