Fix crash in unix users plugins if GID or UID is empty#996
Merged
Horofic merged 5 commits intofox-it:mainfrom Jan 23, 2025
Merged
Fix crash in unix users plugins if GID or UID is empty#996Horofic merged 5 commits intofox-it:mainfrom
Horofic merged 5 commits intofox-it:mainfrom
Conversation
Horofic
requested changes
Jan 20, 2025
Co-authored-by: Stefan de Reuver <9864602+Horofic@users.noreply.github.com>
Contributor
Author
|
@Horofic, changes have been applied. I have also completed test with the new entry |
Horofic
approved these changes
Jan 23, 2025
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #996 +/- ##
=======================================
Coverage 77.76% 77.76%
=======================================
Files 327 327
Lines 28654 28654
=======================================
Hits 22282 22282
Misses 6372 6372
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fix an issue while processing /etc/passwd entry where gid or uid id empty.
This kind OS issue could also be fixed more generally in flow, by checking if entry is empty before coercing into an int, but I'm not sure if this would be the expected comportment for all entries.
Also modify error handler to backslash replace, to prevent crash in case file contains non utf-8 characters.
fix #995