regsub(all?) input limit
idl0r at qasl.de
Thu Dec 3 13:12:53 CET 2015
I just noticed that regsub and likely regsuball will just return the
untouched input string if it exceeds 57118 bytes. Is it intended to do
so, performance reasons perhaps?
In this case it's a custom error page with some (eye candy) embedded
images and in total a bit above the mentioned size. The regsub should
actually just replace a pattern with the XID, in this case simply
regsub(..., "bereq\.xid", bereq.xid).
I've also a test case:
server.hostname + "-" + bereq.xid)
cat <<EOF >error.test
A e.g. custom error file that exceed a max. of 57118 bytes will be
skipped by regsub()
someembeddedimage:$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w
56987 | head -n 1)
That can be reproduced with at least 4.0 and 4.1.
More information about the varnish-misc