Skip to content

Sync upstream v2.18.0 — SSRF fix, node 24 image, and the NODE_ENV patch re-placed by hand - #22

Merged
Mudit-Lal merged 1 commit into
mainfrom
sync/v2.18.0
Sep 19, 2026
Merged

Mudit-Lal merged 1 commit into
mainfrom
sync/v2.18.0

Conversation

@Mudit-Lal

Copy link
Copy Markdown
Contributor

Third upstream sync: v2.17.0 → v2.18.0, 134 files.

Why now

Upstream carries a security fix this instance does not have:

  • #3166 — blocks SSRF via IPv4-mapped IPv6 webhook URLs
  • #3323 — libpdf upgrade
  • #3309 — default unset signing transport to local (this instance runs local)
  • #3351 — react router middleware

Migration

One, additive and nullable — 20260818081941_add_api_token_last_used_property adds ApiToken.lastUsedAt. No drops, no truncates.

The one thing that needed judgement

docker/Dockerfile was hand-merged, not patched. Upstream #3332 moved the image to node 24 / alpine 3.23, rewrote ENV K V into ENV K=V, pinned turbo from the lockfile, switched the runner to npm ci --omit=dev and strips esbuild residue.

Our fork-local ENV NODE_ENV="production" anchors on ENV HUSKY 0 / ENV DOCKER_OUTPUT 1 — the exact two lines that rewrite touched — so a patch apply would have conflicted or, worse, landed in the wrong stage. It was placed by hand in the runner stage.

That block is load-bearing: without it the instance serves React Router's development bundle and useSecureCookies stays false, so session cookies ship without Secure and without the __Secure- prefix. That is the bug fixed in #6 and it would have silently returned. Upstream's new npm ci --omit=dev now makes it belt-and-braces rather than the only guard.

After the merge, docker/Dockerfile differs from upstream v2.18.0 by that block and nothing else.

Fork hygiene

Imported with git read-tree -u --reset per DEVALOK_FORK_NOTES.md, so upstream deletions carry across — apps/remix/Dockerfile.bun and apps/remix/Dockerfile.pnpm are removed. (Missing deletions is exactly how the June 2026 sync left dead code in prod for 2.5 months.)

Guards re-applied to 13 workflow files / 14 jobs. Upstream added and deleted no workflows this cycle. The per-job audit leaves only the two intentionally open jobs: ci.yml/build_docker and codeql-analysis.yml/analyze.

The staged tree differs from upstream v2.18.0 in exactly 15 files — the 13 guarded workflows, DEVALOK_FORK_NOTES.md, and docker/Dockerfile.

Before merging

  • Wait for build_docker to go green. Railway's trigger on main has checkSuites: false, so the merge deploys immediately without waiting for CI.
  • A backup was taken first: db-backups/documenso/2026-09-19/documenso.dump.gpg on R2 (3.1 MB, pg_dump -Fc -Z9, database is 30 MB). Ciphertext round-trip verified; the decrypt half could not be verified on the laptop because gpg-agent will not start there.
  • main requires an approving review and I cannot self-approve, so this needs:
    gh pr merge <n> --repo devalok-design/documenso --squash --admin --delete-branch

Not in this PR

Document storage still points at the AWS account lost on 2026-09-11 (NEXT_PRIVATE_UPLOAD_BUCKET=documenso-devalok, ap-south-1). An R2 bucket documenso-storage has been created to receive it; the cutover needs an R2 S3 token and is separate from this version bump.

🤖 Generated with Claude Code

Third upstream sync, v2.17.0 -> v2.18.0 (134 files).

Motivation is a security fix we do not have: #3166 blocks SSRF via
IPv4-mapped IPv6 webhook URLs. Also picks up #3323 (libpdf upgrade),
#3309 (default unset signing transport to local, which is what this
instance runs) and #3351 (react router middleware).

One Prisma migration, additive and nullable:
20260818081941_add_api_token_last_used_property adds ApiToken.lastUsedAt.

docker/Dockerfile was hand-merged rather than patched. Upstream #3332
moved the image to node 24 / alpine 3.23, rewrote `ENV K V` into
`ENV K=V`, pinned turbo from the lockfile, switched the runner stage to
`npm ci --omit=dev` and strips esbuild residue. Our fork-local
`ENV NODE_ENV="production"` anchors on the two lines that rewrite
touched, so re-applying the patch would have conflicted; the block was
placed by hand in the runner stage instead. Without it the instance
serves React Router's development bundle and useSecureCookies stays
false, which is the dev-mode cookie bug fixed in #6.

Imported with `git read-tree -u --reset` per DEVALOK_FORK_NOTES.md, so
upstream deletions carry across: apps/remix/Dockerfile.bun and
apps/remix/Dockerfile.pnpm are removed. Workflow guards re-applied to 13
files / 14 jobs; upstream added and deleted no workflows this cycle. A
per-job audit leaves only the two intentionally open jobs,
ci.yml/build_docker and codeql-analysis.yml/analyze.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Mudit-Lal
Mudit-Lal merged commit b84521d into main Sep 19, 2026
4 of 6 checks passed
@Mudit-Lal
Mudit-Lal deleted the sync/v2.18.0 branch September 19, 2026 18:45
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