Skip to content

Prevent malformed DNS queries executing JS on querylog/long term query pages#1665

Merged
DL6ER merged 2 commits into
develfrom
fix/escape-all-the-things
Dec 23, 2020
Merged

Prevent malformed DNS queries executing JS on querylog/long term query pages#1665
DL6ER merged 2 commits into
develfrom
fix/escape-all-the-things

Conversation

@PromoFaux

Copy link
Copy Markdown
Member

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide, as well as this entire template.
  • I have made only one major change in my proposed changes.
  • I have commented my proposed changes within the code.
  • I have tested my proposed changes, and have included unit tests where possible.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership.
  • It is compatible with the EUPL 1.2 license
  • I have squashed any insignificant commits. (git rebase)

What does this PR aim to accomplish?:
Fixes a potential vulnerability in the querylog/long term query pages

How does this PR accomplish the above?:
Escapes any data retrieved from the database for these pages, thus preventing executable code being run

What documentation changes (if any) are needed to support this PR?:
None

@PromoFaux
PromoFaux requested a review from DL6ER December 23, 2020 15:40
@PromoFaux
PromoFaux force-pushed the fix/escape-all-the-things branch 2 times, most recently from c568d05 to d6f7955 Compare December 23, 2020 16:17
Comment thread scripts/pi-hole/js/db_queries.js
@PromoFaux
PromoFaux force-pushed the fix/escape-all-the-things branch from d6f7955 to 9744f86 Compare December 23, 2020 18:09
…y log

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
@PromoFaux
PromoFaux force-pushed the fix/escape-all-the-things branch from 9744f86 to d85395c Compare December 23, 2020 18:12
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
@PromoFaux
PromoFaux force-pushed the fix/escape-all-the-things branch from d85395c to 62ac184 Compare December 23, 2020 18:43
@DL6ER
DL6ER merged commit 8d73511 into devel Dec 23, 2020
@DL6ER
DL6ER deleted the fix/escape-all-the-things branch December 23, 2020 19:47
@PromoFaux PromoFaux mentioned this pull request Dec 23, 2020
@pralor-bot

Copy link
Copy Markdown

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

https://discourse.pi-hole.net/t/pi-hole-core-web-v5-2-2-and-ftl-v5-3-3-released/41998/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants