pi-hole / FTL

The Pi-hole FTL engine
https://pi-hole.net
Other
1.39k stars 196 forks source link

Fix incorrect page count on some Query Log shortcuts #2074

Closed DL6ER closed 1 month ago

DL6ER commented 1 month ago

What does this implement/fix?

Do not take the not-filtered shortcut if one of the magic upstream={blocklist,cache} is selected via GET parameter. This is currently broken as detection of ongoing filtering is through variable binding to the SQL string. However, these two special upstreams work by using the IN operator which does not support binding to a prepared statement.


Related issue or feature (if applicable): https://discourse.pi-hole.net/t/incorrect-number-of-pages-in-query-log-if-only-blocked-domains-are-displayed/72622

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

pralor-bot commented 1 month ago

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/incorrect-number-of-pages-in-query-log-if-only-blocked-domains-are-displayed/72622/6