ip2long으로 변환된 REMOTE_ADDR을 유추할수 없도록 md5(sha1(REMOTE_ADDR))로 처리함 (kjsman님,220418)

This commit is contained in:
kagla
2022-04-18 11:47:22 +09:00
parent de72f42216
commit 13bc72def7
3 changed files with 3 additions and 3 deletions

View File

@ -223,7 +223,7 @@ for ($i=1; $i<=$upload_count; $i++) {
$shuffle = implode('', $chars_array);
// 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925)
$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename);
$upload[$i]['file'] = md5(sha1($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename);
$dest_file = G5_DATA_PATH.'/qa/'.$upload[$i]['file'];

View File

@ -570,7 +570,7 @@ if(isset($_FILES['bf_file']['name']) && is_array($_FILES['bf_file']['name'])) {
$shuffle = implode('', $chars_array);
// 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925)
$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename);
$upload[$i]['file'] = md5(sha1($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename);
$dest_file = G5_DATA_PATH.'/file/'.$bo_table.'/'.$upload[$i]['file'];

View File

@ -16,7 +16,7 @@ function make_mp3()
$mp3s[] = $file;
}
$ip = sprintf("%u", ip2long($_SERVER['REMOTE_ADDR']));
$ip = md5(sha1($_SERVER['REMOTE_ADDR']));
$mp3_file = 'cache/kcaptcha-'.$ip.'_'.G5_SERVER_TIME.'.mp3';
$contents = '';