gchq/CyberChef

Bug report: fromDecimal(...) function does not correctly handle delim parameter passed as default ("Auto")

Open

#2217 opened on Mar 4, 2026

View on GitHub
 (2 comments) (0 reactions) (0 assignees)JavaScript (34,843 stars) (3,944 forks)batch import
buggood first issuehelp wanted

Description

Describe the bug When fromDecimal is called without specifying a value for the "delim" parameter, or when delim is passed as "Auto" it will only parse the first number in the passed text ignoring any further numbers whatever separator has been used.

To Reproduce Steps to reproduce the behaviour or a link to the recipe / input used to cause the bug:

See bug report #2139 which arises as a consequence of this issue.

Expected behaviour delim = "Auto" case should be handled correctly, in a manner similar to the fromHex(...) function.

Additional context fromHex could be used as a guide towards a correct implementation, noting that there are other differences because pairs of hex digits can be packed exactly into bytes whereas for decimal up to 3 digits can be required.

Contributor guide