Skip to content

Fix theme name validation in MCP tools - #17

Merged
ruibaby merged 1 commit into
mainfrom
fix/theme-name-validation
Oct 16, 2026
Merged

ruibaby merged 1 commit into
mainfrom
fix/theme-name-validation

Conversation

@ruibaby

@ruibaby ruibaby commented Oct 15, 2026

Copy link
Copy Markdown
Member

Theme tools reject names containing uppercase characters, such as
theme-echoCraft, with themeName must be a lowercase DNS label.

Replace DNS-label validation with non-empty string validation when updating
theme settings and reading templates. Preserve exact active-theme matching,
configuration version checks, and template path protections.

Fixes #16

Reproduction and verification:

  • With theme-echoCraft as the active theme in the test fixture, updating a
    setting group or reading an HTML template fails before the fix.
  • Both regression cases pass after the fix. Blank names and names whose case
    differs from the active theme remain rejected.

Validation:

  • ./gradlew test --tests run.halo.mcpserver.tools.ThemeSettingToolsTest --tests run.halo.mcpserver.tools.ToolSupportTest -x processUiResources
    — 20 tests passed.
  • git diff --check — passed.
  • No end-to-end validation against a running Halo instance.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T16:28:16.948669Z c4e5c1a PR opened
ℹ️ 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.

@ruibaby
ruibaby merged commit 5b3dc37 into main Oct 16, 2026
1 check passed
@ruibaby
ruibaby deleted the fix/theme-name-validation branch October 16, 2026 02:47
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.

主题的MCP工具在调用的时候发生错误

1 participant