Skip to content

Commit

Permalink
Improve descriptions
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian <[email protected]>
  • Loading branch information
kamil-certat and sebix authored Jul 10, 2024
1 parent 8620d9f commit 489a1be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

### Core
- `intelmq.lib.utils.drop_privileges`: When IntelMQ is called as `root` and dropping the privileges to user `intelmq`, also set the non-primary groups associated with the `intelmq` user. Makes the behaviour of running intelmqctl as `root` closer to the behaviour of `sudo -u intelmq ...` (PR#2507 by Mikk Margus Möll).
- `intelmq.lib.utils.unzip`: Filter out directory entries when extracting data fixing the issue that
archives with directories causes extracting empty data for a directory entry (PR# by Kamil Mankowski).
- `intelmq.lib.utils.unzip`: Ignore directories themselves when extracting data to prevent the extraction of empty data for a directory entries (PR#2512 by Kamil Mankowski).

### Development

Expand Down
4 changes: 2 additions & 2 deletions intelmq/tests/lib/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_unzip_tar_gz_return_names(self):
('foo', b'foo text\n')))

def test_unzip_tar_gz_with_subdir(self):
""" Test the unzip function with a tar gz file and return_names. """
""" Test the unzip function with a tar gz file containing a subdirectory and return_names. Test that the directories themselves are ignored. """
filename = os.path.join(os.path.dirname(__file__), '../assets/subdir.tar.gz')
with open(filename, 'rb') as fh:
result = utils.unzip(fh.read(), extract_files=True, return_names=True)
Expand Down Expand Up @@ -298,7 +298,7 @@ def test_unzip_zip_return_names(self):
('foo', b'foo text\n')))

def test_unzip_zip_with_subdir(self):
""" Test the unzip function with a zip containing a subdirectory and returning names."""
""" Test the unzip function with a zip containing a subdirectory and returning names. Test that the directories themselves are ignored."""
filename = os.path.join(os.path.dirname(__file__), '../assets/subdir.zip')
with open(filename, 'rb') as fh:
result = utils.unzip(fh.read(), extract_files=True, return_names=True)
Expand Down

0 comments on commit 489a1be

Please sign in to comment.