by iio7 on 6/15/24, 12:18 PM with 3 comments
Normally the browser will encode the input, but you can force the issue using e.g. cURL:
printf "password=foo\0bar" | curl -X POST --data-binary @- https://example.com -H "Content-Type: application/x-www-form-urlencoded"
How do you deal with this issue?
Do you replace null byte characters or use e.g. the Argon2id algorithm to get around this problem?
by gregjor on 6/15/24, 12:52 PM
If someone deliberately tries to insert a null and get it to your backend code somehow they deserve to get an error.