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

pgsql: use static str for log & remove whitespaces - v1 #9968

Conversation

jufajardini
Copy link
Contributor

Removing the white spaces from the password message, as these can cause issues with grepping commands querying log results, and also doesn't show a consistent behavior among different environments.

Also replace function call with static str, as it wasn't needed there.

Link to redmine ticket:
None yet, will create one if we decide we want to merge and backport this

Describe changes:

  • replace call to to_str() with static string in logging call
  • replace whitespaces in pgsql password not enabled message with _ as it's more query friendly

SV_BRANCH=OISF/suricata-verify#1511

Removing the white spaces from the password message, as these can cause
issues with grepping commands querying log results, and also doesn't
show a consistent behavior among different environments.

Also replace function call with static str, as it wasn't needed there.
Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Merging #9968 (fa4c36a) into master (13cc493) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9968      +/-   ##
==========================================
+ Coverage   82.39%   82.41%   +0.02%     
==========================================
  Files         970      970              
  Lines      271359   271359              
==========================================
+ Hits       223586   223646      +60     
+ Misses      47773    47713      -60     
Flag Coverage Δ
fuzzcorpus 64.45% <0.00%> (+0.01%) ⬆️
suricata-verify 61.31% <100.00%> (+<0.01%) ⬆️
unittests 62.88% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 16879

@jasonish
Copy link
Member

jasonish commented Dec 5, 2023

Something to consider, why log anything at all if password logging is disabled?

@jufajardini
Copy link
Contributor Author

Something to consider, why log anything at all if password logging is disabled?

Indeed xD I think the idea that I had was to inform that it wasn't there due to config, but since this is something only from our end, I see that it would make sense to remove, indeed.

@jufajardini
Copy link
Contributor Author

Replaced by: #9979

@jufajardini jufajardini closed this Dec 6, 2023
@jufajardini jufajardini deleted the pgsql-minor-clean-up-log-message/v1 branch December 7, 2023 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants