Skip to content

fix(say): use absolute Waline URLs and validate explicit comment targets - #38

Merged
lizheming merged 1 commit into
mainfrom
fix/say-waline-target
Nov 20, 2026
Merged

lizheming merged 1 commit into
mainfrom
fix/say-waline-target

Conversation

@lizheming

Copy link
Copy Markdown
Contributor

The Say detail page passed /api/comment as Waline's serverURL, which the pinned client can normalize into the wrong host. Build the full URL from window.location.origin before initializing Waline, and use it for the token request too. This avoids proxy-side host/protocol assumptions.

Retain /says/:id?pathname=&type=3 and the outer encodeURI: Waline 3.16.0 decodes path once before sending, so removing that layer corrupts literal percent escapes. Reject missing stored pathnames rather than emitting an undefined target. The prefix remains presentation-only; core resolves pathname/type.

Tests execute the emitted initialization script and verify HTTPS and HTTP-with-port origins, token URLs, GET/POST serialization and special-character pathnames. Root + Say tests: 257 total, 231 passed, 26 optional/environment skips, no failures. Checked generated paths against the current core's actual pathname parser. Whitespace checks passed. Real signed-in database submission has not been performed; no core/theme edits, merge or release.

@lizheming
lizheming marked this pull request as ready for review November 20, 2026 10:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T10:04:45.886870Z be5e286 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lizheming
lizheming merged commit 694fe2a into main Nov 20, 2026
1 check 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