Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more precise about escaping invalid characters in queries #1318

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

yubiuser
Copy link
Member

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?: {replace this text with a number from 1 to 10, with 1 being not familiar, and 10 being very familiar}


When FTL encounters invalid characters within a query, it will escape them with ~.
From the logging it was not clear which character was the replacement. This PR makes the logging more precise.

Example:

[2022-03-09 06:37:56.649 528M] INFO: FTL escaped 1 characters in "150.109.179.161Æz¡hÌz¡~ob¡"
[2022-03-09 06:37:56.676 528M] INFO: FTL escaped 1 characters in "150.109.179.161Æz¡hÌz¡~ob¡"
[2022-03-09 06:37:56.701 528M] INFO: FTL escaped 1 characters in "150.109.179.161Æz¡hÌz¡~ob¡"
[2022-03-09 06:37:56.719 528M] INFO: FTL escaped 1 characters in "150.109.179.161Æz¡hÌz¡~ob¡"

See this discourse thread: https://discourse.pi-hole.net/t/pihole-log-fill-up-with-strange-letter/54154

Copy link
Member

@DL6ER DL6ER left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New output will be

[2022-03-09 06:37:56.649 528M] INFO: FTL replaced 1 invalid characters with ~ in the query "150.109.179.161Æz¡hÌz¡~ob¡"
[2022-03-09 06:37:56.676 528M] INFO: FTL replaced 1 invalid characters with ~ in the query "150.109.179.161Æz¡hÌz¡~ob¡"
[2022-03-09 06:37:56.701 528M] INFO: FTL replaced 1 invalid characters with ~ in the query "150.109.179.161Æz¡hÌz¡~ob¡"
[2022-03-09 06:37:56.719 528M] INFO: FTL replaced 1 invalid characters with ~ in the query "150.109.179.161Æz¡hÌz¡~ob¡"

@DL6ER DL6ER merged commit 7383842 into development Mar 18, 2022
@DL6ER DL6ER deleted the tweak/escape branch March 18, 2022 16:52
@pralor-bot
Copy link

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

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-15-web-v5-12-and-core-v5-10-released/54987/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