Skip to content

fix: tilde parser in hb_format not escaped#992

Open
speeddragon wants to merge 1 commit into
edgefrom
fix/hb_format_tilde
Open

fix: tilde parser in hb_format not escaped#992
speeddragon wants to merge 1 commit into
edgefrom
fix/hb_format_tilde

Conversation

@speeddragon

Copy link
Copy Markdown
Collaborator

When trying to parse the error message (500) it doesn't escape properly the ~b from /~bundler route definition (opts).

All 3471 tests passed.

Clanker Description

That crash is from HyperBEAM’s error formatter, not directly from your route. It was passing a literal route string containing ~bundler@1\.0 into io_lib:format/2; ~b was treated as a format directive, causing badarg.

I patched src/core/util/hb_format.erl:401 so no-argument indentation treats strings as literals and escapes all ~ characters before calling io_lib:format/2. I also added a regression test for the exact ^/~bundler@1\.0/tx$ shape.

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