diff --git a/ruby/ql/src/queries/security/cwe-117/examples/log_injection_good.rb b/ruby/ql/src/queries/security/cwe-117/examples/log_injection_good.rb index 71b0b8b46046..9ee33804b9f1 100644 --- a/ruby/ql/src/queries/security/cwe-117/examples/log_injection_good.rb +++ b/ruby/ql/src/queries/security/cwe-117/examples/log_injection_good.rb @@ -5,9 +5,8 @@ def login 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