Skip to content

Commit

Permalink
[cleaner] Improve IPV6 MAC address RE
Browse files Browse the repository at this point in the history
Current RE obfuscates also UUID strings, let be more strict.

Resolves: #3766
Relevant: #3736

Signed-off-by: Pavel Moravec <[email protected]>
  • Loading branch information
pmoravec committed Aug 29, 2024
1 parent 3886534 commit 3b6a1fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sos/cleaner/parsers/mac_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
)
# aabb:ccee:ddee:ffaa
IPV6_REG_4HEX = (
r'((?<!([0-9a-fA-F\'\"]:)|::)(([^:\-]?[0-9a-fA-F]{4}(:|-)){3}'
r'[0-9a-fA-F]{4}(\'|\")?(\/|\,|\-|\.|\s|$)))'
r'((?<!\w)(([0-9a-fA-F]{4}:){3}[0-9a-fA-F]{4})(?!\w))|'
r'((?<!\w)(([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{4})(?!\w))'
)
# aa:bb:cc:dd:ee:ff avoiding ipv6 substring matches
IPV4_REG = (
Expand Down

0 comments on commit 3b6a1fe

Please sign in to comment.