mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #16107 from erik-krogh/fix-log-injection-typo
RB: Tiny fixes to log-injection QHelp
This commit is contained in:
@@ -5,9 +5,8 @@ class UsersController < ApplicationController
|
||||
logger = Logger.new STDOUT
|
||||
username = params[:username]
|
||||
|
||||
# GOOD: log message constructed with unsanitized user input
|
||||
sanitized_username = username.gsub("\n", "")
|
||||
logger.info "attempting to login user: " + sanitized_username
|
||||
# GOOD: log message constructed with sanitized user input
|
||||
logger.info "attempting to login user: " + sanitized_username.gsub("\n", "")
|
||||
|
||||
# ... login logic ...
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user