-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat cerfa dates #3600
Feat cerfa dates #3600
Conversation
51f83ed
to
0641292
Compare
Quality Gate passedIssues Measures |
public async canActivate(context: ExecutionContext) { | ||
const r = context.switchToHttp().getRequest(); | ||
|
||
console.log(r?.params?.structureId); |
Check warning
Code scanning / CodeQL
Log injection Medium
user-provided value
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 27 days ago
To fix the problem, we need to sanitize the user input before logging it. Specifically, we should remove any newline characters from the structureId
parameter to prevent log injection attacks. This can be done using the String.prototype.replace
method to strip out newline characters.
We will modify the code to sanitize r?.params?.structureId
before logging it. This involves creating a sanitized version of structureId
and then logging the sanitized value.
-
Copy modified lines R17-R18
@@ -16,3 +16,4 @@ | ||
|
||
console.log(r?.params?.structureId); | ||
const sanitizedStructureId = r?.params?.structureId?.replace(/\n|\r/g, ""); | ||
console.log(sanitizedStructureId); | ||
console.log(r?.user?.isSuperAdminDomifa); |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #3600 +/- ##
==========================================
- Coverage 66.56% 66.48% -0.09%
==========================================
Files 910 912 +2
Lines 14913 14942 +29
Branches 2065 2074 +9
==========================================
+ Hits 9927 9934 +7
- Misses 4678 4699 +21
- Partials 308 309 +1
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
🎉 This PR is included in version 2.188.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.