Bug with use of SHA256 and salt ending with $

Wappler Version : 3.0.1
Operating System : win 10
PHP

Expected behavior

Action should save and be re-openable

Actual behavior

image

See video

Investigation of the JSON shows that the end of the line for the sha256 encryption is truncated

                "value": "{{$_POST.Surname.lowercase().sha256('$12345678
JSON

The same truncation is also present in the actual query definition

Full file attached

add_new_applicant_v7.zip (2.5 KB)

Fortunately I can get around this issue by setting a variable to contain the salt and using the variable in the query definition of the salt.

This must be a new bug as i have been using a salt starting and ending in a $ symbol on this site for almost two years without any issue . I initially assumed it was related to using lowercase() and Sha() together but the same happens when i don’t use lowercase, it seems it is the symbol which causes the issue.

NO JSON HAS BEEN MANUALLY EDITED

1 Like

I was able to reproduce it and it isn’t just the sha256 that is broken. Any expression with the combination $' in it breaks the json.

2 Likes

This is fixed in Wappler 3.0.2

This topic was automatically closed after 2 days. New replies are no longer allowed.