v1.0.3
Pull Request Title: Potential fix for code scanning alert no. 3: Log Injection
Pull Request URL: PR Link
Opened By: githubofkrishnadhas
Merged: True
Description: Potential fix for https://github.com/devwithkrishna/example-python-application/security/code-scanning/3
To fix the log injection issue, we need to sanitize the user-provided values before logging them. Specifically, we should remove any newline characters from the item.color
and item.username
values to prevent log injection attacks. This can be done using the replace
method to replace \r\n
and \n
with empty strings.
Suggested fixes powered by Copilot Autofix. Review carefully before merging.
Created At: 2025-04-12T19:26:51Z
Closed & Merged At: 2025-04-16T14:57:22Z
Assignees: githubofkrishnadhas
Total Commits: 1
What's Changed
- Potential fix for code scanning alert no. 3: Log Injection by @githubofkrishnadhas in #5
Full Changelog: v1.0.2...v1.0.3