diff --git a/Web/app.py b/Web/app.py index b728eaf..9e015e1 100755 --- a/Web/app.py +++ b/Web/app.py @@ -466,16 +466,36 @@ PERMISSION_ACTION_ENDPOINTS = { } ALLOWED_COVER_DOMAINS = { + # --- Google / Open APIs --- "books.google.com", - "covers.openlibrary.org", - "images-na.ssl-images-amazon.com", - "m.media-amazon.com", - "www.isbn.de", + "www.googleapis.com", + + # --- Open Library / Internet Archive --- "covers.openlibrary.org", "openlibrary.org", + + # --- Amazon / Goodreads --- + "images-na.ssl-images-amazon.com", + "m.media-amazon.com", + "i.gr-assets.com", # Goodreads image CDN + + # --- Library / Catalog Services --- + "www.isbn.de", "lobid.org", - "www.googleapis.com", - "www.westermann.de" + "syndetics.com", # Standard cover provider for libraries + "pics.librarything.com", # LibraryThing covers + "portal.dnb.de", # Deutsche Nationalbibliothek + + # --- German Educational & International Publishers --- + "www.westermann.de", + "www.klett.de", # Ernst Klett Verlag + "medien.klett.de", # Klett media CDN + "www.cornelsen.de", # Cornelsen Verlag + "images.penguinrandomhouse.com", # Penguin Random House + + # --- Book Retailer CDNs (often used for cover fetching) --- + "images.thalia.media", # Thalia + "bilder.buecher.de" # buecher.de } SENSITIVE_AUDIT_FIELDS = ["email", "username", "full_name", "phone", "borrower", "ip"] @@ -10044,7 +10064,7 @@ def download_book_cover(): return jsonify({"error": "Only public HTTPS URLs are allowed"}), 400 # 2. SSRF Protection: Strict Allowlist Check - # if parsed_url.netloc not in ALLOWED_COVER_DOMAINS: # ---------------------------------------------- has to be implementet at a laterstage --------------------------------------------------------------- + # if parsed_url.netloc not in ALLOWED_COVER_DOMAINS: # return jsonify({"error": "Target host is not an allowed book cover provider"}), 403 # Download the image (allow_redirects=False prevents redirecting to internal IPs) diff --git a/Web/templates/library_table.html b/Web/templates/library_table.html index bcb2eab..e8e51d2 100644 --- a/Web/templates/library_table.html +++ b/Web/templates/library_table.html @@ -52,9 +52,10 @@ /* The Scrollable Content Area */ #detailContent { - overflow-y: auto; /* Adds scrollbar only if needed */ - padding-right: 10px; /* Prevents text from rubbing against the scrollbar */ + overflow-y: auto; + padding-right: 10px; } + /* Library table-only view styles */ .library-table-container { max-width: 1400px; @@ -276,6 +277,7 @@ border-bottom: 1px solid #eee; color: #555; font-size: 0.95em; + vertical-align: middle; } .library-items-table tbody tr:hover { @@ -500,14 +502,14 @@