Also detect force_download=Y option in procFileDownload

This commit is contained in:
Kijin Sung 2018-03-10 00:30:03 +09:00
parent a1aa0a576e
commit 5fa2dec9db

View file

@ -391,7 +391,7 @@ class fileController extends file
}
$file_key_data = $file_obj->file_srl . $file_obj->file_size . $file_obj->uploaded_filename . $_SERVER['REMOTE_ADDR'];
$file_key = substr(hash_hmac('sha256', $file_key_data, $_SESSION['__XE_FILE_KEY__']), 0, 32);
header('Location: '.getNotEncodedUrl('', 'act', 'procFileOutput','file_srl',$file_srl,'file_key',$file_key));
header('Location: '.getNotEncodedUrl('', 'act', 'procFileOutput', 'file_srl', $file_srl, 'file_key', $file_key, 'force_download', Context::get('force_download') === 'Y' ? 'Y' : null));
Context::close();
exit();
}