From 6b650981dafc18379413a1cf4e1fff4e22647844 Mon Sep 17 00:00:00 2001 From: neon <18559658+neonsolstice@users.noreply.github.com> Date: Mon, 11 May 2026 18:42:18 +0000 Subject: [PATCH] fix(docker): rebuild kepubify with Go 1.26.3, fix read-only fs chmod Replaced pre-compiled kepubify binaries (built with Go 1.17.8, 53 HIGH/CRITICAL CVEs) with binaries rebuilt from source using Go 1.26.3 and golang.org/x/text upgraded to v0.3.8, resolving all fixable CVEs. Also fixed KepubifyBinaryService incorrectly falling back to downloading the binary on every startup in read-only containers. chmod() was throwing EROFS, and the single catch block treated it as a missing file. Split stat and chmod into separate try/catch so only a missing-file error triggers the download fallback. --- .gitattributes | 1 + Dockerfile | 3 +- client/src/features/settings/KoboSettings.vue | 4 - server/bin/kepubify/kepubify-linux-64bit | Bin 0 -> 5855620 bytes server/bin/kepubify/kepubify-linux-arm64 | Bin 0 -> 5677027 bytes .../services/kepubify-binary.service.test.ts | 202 ++++++++++++------ .../kobo/services/kepubify-binary.service.ts | 57 ++++- .../services/kobo-download.service.test.ts | 37 ++++ .../kobo/services/kobo-download.service.ts | 1 + 9 files changed, 229 insertions(+), 76 deletions(-) create mode 100644 .gitattributes create mode 100755 server/bin/kepubify/kepubify-linux-64bit create mode 100755 server/bin/kepubify/kepubify-linux-arm64 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..f85449a1a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +server/bin/kepubify/* binary diff --git a/Dockerfile b/Dockerfile index 1df99bd21..7b9755456 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,8 +50,9 @@ ENV PORT=3000 COPY --from=server-builder --chown=node:node /deploy ./ COPY --from=client-builder --chown=node:node /app/client/dist ./public COPY --from=server-builder --chown=node:node /app/server/entrypoint.sh ./entrypoint.sh +COPY --chown=node:node server/bin/kepubify/ ./bin/kepubify/ -RUN chmod +x /app/entrypoint.sh && mkdir -p /books /data/covers /data/book-bucket /tmp && chown -R node:node /data /tmp +RUN chmod +x /app/entrypoint.sh /app/bin/kepubify/* && mkdir -p /books /data/covers /data/book-bucket /tmp && chown -R node:node /data /tmp EXPOSE 3000 diff --git a/client/src/features/settings/KoboSettings.vue b/client/src/features/settings/KoboSettings.vue index e520c7b54..0c333c875 100644 --- a/client/src/features/settings/KoboSettings.vue +++ b/client/src/features/settings/KoboSettings.vue @@ -203,10 +203,6 @@ async function saveSettings() { Copy -
- On your Kobo device, go to Settings → Account → Add account → Other and enter this URL. - Any username/password will work. -
05LXcA4>8}?T>+!FBK`jBH%QqG%TN*(OSICsmvA4NTU$XC5Lp&6$arV
z@mWyy9PQ7U!?C3Ct1M~nGt>)dza|_jXVc3l(m{*9-!k+aIhJ{qYLZFcJ0r2DEqyBk
zK=KTAP@S)NER(+1_+wcwB!6CGQA+EM*8qOEa_EcNnnNoN?b+BEJ2a)i^q_H*ro{S!
z2F#lnt*n~_lF7$HxPox8UIsP)nz5c?{O^z5V*Kye!_Kz$u%nF^$ynWpi2=pkwtOLl
z+2KkHzP~T*GZ%ra&bV2o+S90w>nB&1x8GL@&xcNpU&x|o1})XZ4xhTNTIqwa?;TD{
z(0hh}_4S`Jyq6M7SQ#aq^+JH1S9Yi+g|hLLV!duYXsyq?vKu^D+hOXlm@
zC!xEf7B_e)68IHPA|`#gZq#3c@Wg-5`4o&tKOgC9G8sZWosGLAef5wDZ{4Rzyxz6
zvv1+V8taH;-sFfxsP48v!IKBWT{|stDyuinFt@%))JU{O7$HnALtyPhObDS{K@_72
z!|;R+&D{&7hgp=F0TF E@NVS17c%Im^PCvxeZ+px{@Y`M9?#b^k5mpx3ZIzjCWe`2d
z4S7W%;7G}d(XOuDFZ)(l8>CDi^M}HfGT)vpH_vj0g$8QEz$&JrEq`n<3M;Uu@MFT8
zj`@eMI{ZKsBP3&gaNZ`Z)EihH4?C*rN5L*+qE3@=3A-syz8MkxLKojCRdrLYsfgj&5a`Ol!iy5IX`fd7s>>xto8d8iL%
zd%X7@3Y^}PDlmhOchJBqDu6bXbzfIt&g0Ol&L(3)tZCBC@&?@`@~5k^pQS6iq{;L&
z|MXYF9MR$a>V5i{7}^BzL<7aPzg%J2(=CP~H~zuE>`gQPzRUoA-2DK49N)Uj{sYuY
z