From fe4be7cbb23d374426e22f243925c245d32c8afa Mon Sep 17 00:00:00 2001 From: stevemcgrath Date: Mon, 24 Aug 2026 15:50:15 -0500 Subject: [PATCH] Updated the comparison to always ensure string-to-string matching #1015 --- tenable/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tenable/utils.py b/tenable/utils.py index ddfc1a830..5a6d3673c 100644 --- a/tenable/utils.py +++ b/tenable/utils.py @@ -89,8 +89,9 @@ def scrub(value: Any) -> str: """ Scrubs converts the value to a string and then scrubs out any illegal characters. """ + value = str(value) safe_chars = string.ascii_letters + string.digits + '-_%@:' - scrubbed_value = ''.join([c for c in str(value) if c in safe_chars]) + scrubbed_value = ''.join([c for c in value if c in safe_chars]) if value != scrubbed_value: logger.warning( f"Value '{value}' has unsafe chars, scrubbing to '{scrubbed_value}'"