Prevents a crash with a crafted CGI request if
Privoxy is toggled off.
OVE-
20210206-0001.
Reported by: Joshua Rogers (Opera)
{
char imagetype = lookup(parameters, "type")[0];
+ if (imagetype != 'a' && imagetype != 'b' &&
+ imagetype != 'p' && imagetype != 't')
+ {
+ log_error(LOG_LEVEL_ERROR, "Overruling invalid image type '%c'.",
+ imagetype);
+ imagetype = 'p';
+ }
+
/*
* If type is auto, then determine the right thing
* to do from the set-image-blocker action