File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public async Task InvokeAsync(HttpContext context)
42
42
{
43
43
string role = context . Request . Query [ "role" ] ;
44
44
45
- // BAD: User input logged as-is
45
+ // BAD: User input logged as-is (cs/log-forging)
46
46
_logger . LogWarning ( role + " log in requested." ) ;
47
47
48
48
// GOOD: User input logged with new-lines removed
@@ -62,9 +62,11 @@ public async Task InvokeAsync(HttpContext context)
62
62
_logger . LogWarning ( role ? . Replace ( Environment . NewLine , "" ) + " log in requested" ) ;
63
63
}
64
64
65
+ // ISSUE: cast to enum so should be sanitized (cs/cleartext-storage-of-sensitive-information)
65
66
var accountKey = AccountRegistrationEventType . AccountCreated ;
66
67
_logger . LogInformation ( $ "InvokeAsync called for event: { accountKey } ") ;
67
68
69
+ // GOOD: enum value
68
70
_logger . LogInformation ( $ "InvokeAsync called for event: { AccountRegistrationEventType . AccountCreated } ") ;
69
71
70
72
You can’t perform that action at this time.
0 commit comments