Skip to content

Commit 7f70d6c

Browse files
Potential fix for code scanning alert no. 6: HTTP Response Splitting
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent ab4053f commit 7f70d6c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugins/titlegiver/test/test_titlegiver.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ def redirect(self):
2020
if count > 1:
2121
url = "redirect?count={0}&url={1}".format(count - 1, self.url_queries["url"][0])
2222

23+
# Sanitize URL to prevent HTTP response splitting via CR/LF injection.
24+
url = url.replace("\r", "").replace("\n", "")
25+
2326
self.send_response(301)
2427
self.send_header("Location", url)
2528
self.end_headers()

0 commit comments

Comments
 (0)