@@ -185,13 +185,13 module Redmine | |||||
185 | end |
|
185 | end | |
186 |
|
186 | |||
187 | # Hides username/password in a given command |
|
187 | # Hides username/password in a given command | |
188 |
def self. |
|
188 | def self.strip_credential(cmd) | |
189 | q = (Redmine::Platform.mswin? ? '"' : "'") |
|
189 | q = (Redmine::Platform.mswin? ? '"' : "'") | |
190 | cmd.to_s.gsub(/(\-\-(password|username))\s+(#{q}[^#{q}]+#{q}|[^#{q}]\S+)/, '\\1 xxxx') |
|
190 | cmd.to_s.gsub(/(\-\-(password|username))\s+(#{q}[^#{q}]+#{q}|[^#{q}]\S+)/, '\\1 xxxx') | |
191 | end |
|
191 | end | |
192 |
|
192 | |||
193 | def strip_credential(cmd) |
|
193 | def strip_credential(cmd) | |
194 |
self.class. |
|
194 | self.class.strip_credential(cmd) | |
195 | end |
|
195 | end | |
196 | end |
|
196 | end | |
197 |
|
197 |
General Comments 0
You need to be logged in to leave comments.
Login now