로그에서 민감정보 기록하지 않도록 수정

This commit is contained in:
chicpro
2015-09-16 12:01:54 +09:00
parent 8b84b0c6ba
commit 3dc5c19148
2 changed files with 20 additions and 13 deletions

View File

@ -395,9 +395,13 @@
}
public function writeLog($strLogText) {
$log_string = "";
$exclude = array('MID', 'merchantEncKey', 'merchantHashKey', 'CancelPwd');
if (is_array($strLogText)) {
$log_string = "[".date("Y/m/d H:i:s")."] \r\n";
foreach (array_keys($strLogText) as $key) {
if(in_array($key, $exclude))
continue;
$log_string = $log_string." [".$key."] => ".$strLogText[$key]."\r\n";
}
} else {

View File

@ -141,6 +141,9 @@
if (is_array($strLogText)) {
$log_string = "[".date("Y/m/d H:i:s")."] \r\n";
foreach (array_keys($strLogText) as $key) {
if($key == 'MERCHANT_ID')
continue;
$log_string = $log_string." [".$key."] => ".$strLogText[$key]."\r\n";
}
} else {