Skip to content

fix(acl): improve error handling for non-finite floats - #15893

Open
Br1skyy wants to merge 1 commit into
tauri-apps:devfrom
Br1skyy:fix/nonfinite-float-panic
Open

fix(acl): improve error handling for non-finite floats#15893
Br1skyy wants to merge 1 commit into
tauri-apps:devfrom
Br1skyy:fix/nonfinite-float-panic

Conversation

@Br1skyy

@Br1skyy Br1skyy commented Aug 19, 2026

Copy link
Copy Markdown

Fixes #15477. acl::Value to serde_json::Value was calling .unwrap() on from_f64() which gives a bare panic for NaN and ±Infinity. This adds an early reject at the TOML entry point with a clear assert message, and a descriptive expect message on the JSON conversion so the panic is understandable. Previous attempt in #15482 mapped these to null but that was closed because silently dropping values can mask bugs.

@Br1skyy
Br1skyy requested a review from a team as a code owner August 19, 2026 00:52
Fixes tauri-apps#15477. TOML config parsing now rejects NaN/±Infinity early with
a clear assert message, and the JSON conversion uses a descriptive
panic message instead of a bare unwrap() failure.

Previous attempt in tauri-apps#15482 mapped non-finite floats to null, but that
was rejected because silently dropping values can mask bugs.
@Br1skyy
Br1skyy force-pushed the fix/nonfinite-float-panic branch from e8482d8 to 83a38c7 Compare August 19, 2026 00:56
@Br1skyy Br1skyy changed the title fix(acl): prevent panic on NaN/Infinity float conversion fix(acl): improve error handling for non-finite floats Aug 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Changes Through 83a38c7

There are 14 changes which include tauri-utils with minor, tauri with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-build with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-bundler with minor, tauri-macos-sign with minor, @tauri-apps/api with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin 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-apps/api 2.11.1 2.12.0
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.12.0
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

@Legend-Master

Copy link
Copy Markdown
Contributor

Hey, thanks for the PR, I would probably want to go with #15484 though that removes this struct entirely.

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] Panic on inf/-inf/NaN floats when converting acl::Value to serde_json::Value

2 participants