Conversation
ajslater
commented
Apr 27, 2026
Owner
- Fixes
- Fix PDFs not displaying with default reader settings.
- Fix browser paginator slider.
- Possible fix for expired and corrupt sessions causing FK errors.
…ages. move ci contaiiner to compose
…ender so the menu isn't lost in the center of the screen
…justing template settings in debug mode
commit c76660006840abb36aa37d7355d5c7e242babebf Merge: b2b5a011a be94a0a Author: AJ Slater <aj@slater.net> Date: Sun Apr 5 15:49:11 2026 -0700 Merge branch 'develop' into select-multiple commit b2b5a011ab207a7307505b092877f789e1a66ab3 Author: AJ Slater <aj@slater.net> Date: Sat Apr 4 22:15:54 2026 -0700 fix card menu hover highlighting commit 5a98fe23d89be5e11fa46ada927100ccd3e08cda Author: AJ Slater <aj@slater.net> Date: Sat Apr 4 22:13:37 2026 -0700 new design for select many mode. no settings drawer involvement. reconfigure cards commit 82c612e3f77eec90b02465174b49fc8552871686 Author: AJ Slater <aj@slater.net> Date: Sat Apr 4 01:50:11 2026 -0700 add github config to source include. remove dockerhub config commit b02bd450f4598300d78433a2d749741872d14894 Author: AJ Slater <aj@slater.net> Date: Sat Apr 4 01:42:32 2026 -0700 update deps commit d7bbc875e7936d808259c9ba726127fcc3af905e Author: AJ Slater <aj@slater.net> Date: Fri Apr 3 23:56:12 2026 -0700 select many toolbar commit 246d5ecda59aaabb83e41db3ad32ec552804b9ae Author: AJ Slater <aj@slater.net> Date: Fri Apr 3 22:23:24 2026 -0700 select many feature first attempt
iOS Panels (and other Basic-Auth OPDS clients) intermittently hit
sqlite3.IntegrityError: FOREIGN KEY constraint failed when settings
or bookmarks were saved. Two interacting bugs caused it:
- Janitor cleanup_sessions used `if not session.get_decoded():` to
detect "corrupt" sessions. get_decoded() returns {} for both real
decode failures and legitimate anonymous sessions with no stored
data — exactly what Basic-Auth OPDS clients produce. The nightly
task was wiping valid session rows. Replaced with a direct
signing.loads() call so only genuine signature/decode failures are
flagged.
- _ensure_session_key returned the cookie's session_key without
verifying the row still exists. With cached_db the session loads
from cache without rechecking, so a stale cookie key would slip
through and cause an FK violation when used as SettingsBrowser /
SettingsReader.session_id. Now we verify existence and flush+save
to cycle the key when the row is gone.
Either fix alone closes the user-visible error; both together also
stop the underlying churn that created the bad state.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
The same stale-session_key FK-violation pattern existed in two more places that also write rows whose session FK can be stale: - BookmarkAuthMixin.get_bookmark_auth_filter — feeds session_id into Bookmark.objects.bulk_create / bulk_update. - ReaderSettingsBaseView._get_bookmark_auth_filter — feeds session_id into SettingsReader.objects.create. Both used the old `if not session.session_key: save()` pattern that trusts the cookie. Hoist the validated _ensure_session_key helper from SettingsBaseView up to AuthMixin so every auth-aware view shares one implementation, and switch both call sites to it. BookmarkAuthMixin now extends AuthMixin to inherit the helper. BookmarkFilterMixin is unchanged — it's read-only (filter Q only) and a missing session correctly returns no rows. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.