Skip to content

fix(cli): prevent malformed tauri.conf.json from unsanitized user input#15645

Open
ramsesndame237 wants to merge 1 commit into
tauri-apps:devfrom
ramsesndame237:fix/init-sanitize-json-input-15635
Open

fix(cli): prevent malformed tauri.conf.json from unsanitized user input#15645
ramsesndame237 wants to merge 1 commit into
tauri-apps:devfrom
ramsesndame237:fix/init-sanitize-json-input-15635

Conversation

@ramsesndame237

@ramsesndame237 ramsesndame237 commented Jul 2, 2026

Copy link
Copy Markdown

Fixes #15635

for the fix i reproduice the error localy on my windows 11 machine
Capture d'écran 2026-07-02 162931
the error show me that is en sanitazation the problem the double quote of the name interupted the read of the json because the title was ""title_name"" and in a json is a bad write is you don't echaped the caracter so i propose a correction were i strip the surrounding quotes from every prompt answer before it gets used, and i also escape the user input properly when it's injected into tauri.conf.json, so special characters like quotes, backslashes or newlines can no longer break the generated file. i also added a basic validation for the dev server url, and removed the unwrap() calls that were parsing the generated config, replacing them with proper error handling so a bad value gives a clear error instead of crashing the cli. And is working
Capture d'écran 2026-07-02 232917

@ramsesndame237 ramsesndame237 requested a review from a team as a code owner July 2, 2026 22:47
@ramsesndame237 ramsesndame237 force-pushed the fix/init-sanitize-json-input-15635 branch from d63f2a6 to e624f21 Compare July 2, 2026 23:10
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through e624f21

There are 12 changes which include tauri with minor, tauri-build with minor, tauri-utils with minor, tauri-runtime-wry with minor, tauri-runtime with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor, tauri-cli with minor, tauri-macos-sign with minor, tauri-bundler with minor, tauri-driver with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-utils 2.9.3 2.10.0
tauri-macos-sign 2.3.4 2.4.0
tauri-bundler 2.9.4 2.10.0
tauri-runtime 2.11.3 2.12.0
tauri-runtime-wry 2.11.4 2.12.0
tauri-codegen 2.6.3 2.7.0
tauri-macros 2.6.3 2.7.0
tauri-plugin 2.6.3 2.7.0
tauri-build 2.6.3 2.7.0
tauri 2.11.5 2.12.0
@tauri-apps/cli 2.11.4 2.11.5
tauri-cli 2.11.4 2.12.0
tauri-driver 2.0.6 2.1.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

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.

[bug] tauri init panics when window title contains double quotes

1 participant