FIX Prevent SQLi when no URL filters are applied

Separate PR coming for 3.1/master