Skip to content

fix: numeric helper argument coercion#303

Merged
Mzack9999 merged 1 commit intomainfrom
dwisiswant0/fix/numeric-helper-argument-coercion
Apr 27, 2026
Merged

fix: numeric helper argument coercion#303
Mzack9999 merged 1 commit intomainfrom
dwisiswant0/fix/numeric-helper-argument-coercion

Conversation

@dwisiswant0
Copy link
Copy Markdown
Member

Several DSL helpers assumed numeric arguments
always came as float64. This broke nested constant
expressions where another helper returned int or
int64 like "rand_base(rand_int(...))" or
"rand_text_numeric(rand_int(...))".

Switch the affected numeric paths to use cast-
backed integer conversion. It still rejects non-
numeric inputs and keeps the existing optional
decompression limit fallback.

Fixes #301

Several DSL helpers assumed numeric arguments
always came as float64. This broke nested constant
expressions where another helper returned `int` or
`int64` like `"rand_base(rand_int(...))"` or
`"rand_text_numeric(rand_int(...))"`.

Switch the affected numeric paths to use cast-
backed integer conversion. It still rejects non-
numeric inputs and keeps the existing optional
decompression limit fallback.

Fixes #301

Signed-off-by: Dwi Siswanto <git@dw1.io>
@dwisiswant0 dwisiswant0 requested a review from Mzack9999 April 22, 2026 21:33
@neo-by-projectdiscovery-dev
Copy link
Copy Markdown

neo-by-projectdiscovery-dev Bot commented Apr 22, 2026

Neo - PR Security Review

No security issues found

Comment @pdneo help for available commands. · Open in Neo

@Mzack9999 Mzack9999 merged commit b6e3ec9 into main Apr 27, 2026
8 checks passed
@Mzack9999 Mzack9999 deleted the dwisiswant0/fix/numeric-helper-argument-coercion branch April 27, 2026 02:13
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: interface conversion: interface {} is int, not float64 during template parsing

2 participants