fastly / libvmod-urlcode

urlencode/urldecode functions vmod

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using a value with a non-sanatized length will result to an exhaust of workspace

JonathanHuot opened this issue · comments

Hi,

If we try to use any functions with a http header (a value with a variable length), which is a bit less than current thread workspace size, the vmod call will return a valid string, but workspace will be exhausted for other vmods, or even for varnish core itself.

It is a bit annoying because when thread workspace is exhausted, we're not killing the thread or the request, varnish instance is killing itself.

Length could be sanatized before calling this vmodule, but it might be safer to handle this problem from the inside, or at least give an example of how-to handle this from the outside (in VCL).

Thanks

This issue is more a generic problem to all VMODs and usage of WS when handling unknown length.