mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
perf(koreader): check md5 before bcrypt when authenticating plugin requests
The KOReader plugin sends md5(password) as x-auth-key, which can never match the bcrypt hash of the plaintext password. The auth guard ran a cost-12 bcrypt compare first, so every authenticated request spent about 250 ms of CPU and stalled other traffic before the md5 fallback accepted it. Check md5 first and keep bcrypt as the fallback for clients that send the plaintext password, so the accepted credentials are unchanged. A plugin auth call drops from about 285 ms to 8 ms. Bump the KOReader plugin to 2.2.0. The plugin changed after the 2.1.0 release shipped in v3.6.0 (series sorting, series selection, file browser exit, paged Shelves list) without a version bump. Also fix three metadata-fetch tests that were failing on main sincecfcd4ca52kept single-digit tokens in tokenizeTitleText. A volume digit in the query diluted the word overlap in scoreTitleMatch, so an ebook candidate fell under the relevance floor and a manga outranked it. scoreTitleMatch now drops lone digits again; symmetricTitleSimilarity keeps them to tell volumes apart. Also align the pnpm version installed in both Dockerfiles with the packageManager field. Sincef2a7a1118the images installed pnpm 11.22.0 while package.json pinned 11.28.9, so pnpm tried to switch itself and failed the arm64 image build with a missing @pnpm/exe lockfile entry. Closes #1983 Ref #2037
This commit is contained in:
@@ -4,7 +4,7 @@ ARG NODE_IMAGE=node:26.12.1-trixie-slim
|
||||
|
||||
FROM ${NODE_IMAGE} AS builder
|
||||
WORKDIR /app
|
||||
RUN npm install -g pnpm@11.22.0
|
||||
RUN npm install -g pnpm@11.28.9
|
||||
|
||||
# The image runs on CPU only: without this, onnxruntime-node downloads its CUDA provider on
|
||||
# linux/x64, which cannot load here (no CUDA or cuDNN libraries) and only adds size.
|
||||
|
||||
Reference in New Issue
Block a user