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

fix: Obfuscate the question_name field #1471

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion querylog/logger_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func LogEntryFields(entry *LogEntry) logrus.Fields {
"response_reason": entry.ResponseReason,
"response_type": entry.ResponseType,
"response_code": entry.ResponseCode,
"question_name": entry.QuestionName,
"question_name": util.Obfuscate(entry.QuestionName),
"question_type": entry.QuestionType,
"answer": entry.Answer,
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we do obfuscate this, we should also do the answer:

Suggested change
"answer": entry.Answer,
"answer": util.Obfuscate(entry.Answer),

Copy link
Author

Choose a reason for hiding this comment

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

Answer is already obfuscated. That's because it's piped through util.AnswerToString which obfuscates everything (including query type, amusingly, even though that's clear from the length).

"duration_ms": entry.DurationMs,
Expand Down