Skip to content

Strip null-bytes from bytestrings being made safe for PostgreSQL#3552

Merged
lunkwill42 merged 2 commits into5.14.xfrom
fix/2479-nullbytes-SUNET
Sep 26, 2025
Merged

Strip null-bytes from bytestrings being made safe for PostgreSQL#3552
lunkwill42 merged 2 commits into5.14.xfrom
fix/2479-nullbytes-SUNET

Conversation

@hmpf
Copy link
Copy Markdown
Contributor

@hmpf hmpf commented Sep 23, 2025

Scope and purpose

Fixes #2479. Replaces #3539.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • [ ] Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • This pull request is based on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.
  • [ ] If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • [ ] If this results in changes in the UI: Added screenshots of the before and after
  • [ ] If this adds a new Python source code file: Added the boilerplate header to that file

paulopamplona and others added 2 commits September 23, 2025 11:16
PostgreSQL croaks on these.

For #2479

---------

Co-authored-by: Hanne Moa <hanne.moa@sikt.no>
@hmpf hmpf self-assigned this Sep 23, 2025
@hmpf hmpf added the snmp label Sep 23, 2025
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Test results

   12 files     12 suites   12m 30s ⏱️
2 377 tests 2 377 ✅ 0 💤 0 ❌
6 666 runs  6 666 ✅ 0 💤 0 ❌

Results for commit b18ae32.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.29%. Comparing base (f37e6ce) to head (b18ae32).
⚠️ Report is 13 commits behind head on 5.14.x.

Additional details and impacted files
@@           Coverage Diff           @@
##           5.14.x    #3552   +/-   ##
=======================================
  Coverage   61.29%   61.29%           
=======================================
  Files         610      610           
  Lines       44724    44725    +1     
  Branches       43       43           
=======================================
+ Hits        27412    27413    +1     
  Misses      17302    17302           
  Partials       10       10           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hmpf
Copy link
Copy Markdown
Contributor Author

hmpf commented Sep 23, 2025

Change from #3539: made the stripping happen only once, combined the changelog commits into one, reworded commit messages.

@hmpf hmpf requested a review from a team September 23, 2025 09:41
@hmpf
Copy link
Copy Markdown
Contributor Author

hmpf commented Sep 25, 2025

@lunkwill42 is this good enough or do you want to do something else with misbehaving servers/MIBs? We still need to save PostgreSQL from null-bytes though.

Copy link
Copy Markdown
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

This looks absolutely fine to me. My thanks to @paulopamplona as well :)

@lunkwill42 lunkwill42 merged commit d29eb91 into 5.14.x Sep 26, 2025
18 checks passed
@lunkwill42 lunkwill42 deleted the fix/2479-nullbytes-SUNET branch September 26, 2025 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants