Skip to content

Develop - #609

Merged
ajslater merged 164 commits into
mainfrom
develop
Apr 27, 2026
Merged

ajslater merged 164 commits into
mainfrom
develop

Conversation

@ajslater

Copy link
Copy Markdown
Owner
  • Fixes
    • Fix PDFs not displaying with default reader settings.
    • Fix browser paginator slider.
    • Possible fix for expired and corrupt sessions causing FK errors.

ajslater added 30 commits April 4, 2026 22:21
…ender so the menu isn't lost in the center of the screen
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
ajslater and others added 29 commits April 23, 2026 10:08
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>
@ajslater
ajslater merged commit 3a9f47f into main Apr 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant