检测.ZIP的内部大小而无需提取?

时间:2019-02-08 10:51:51

标签: zip size extract filesize

我们担心要保护我们的网站不受zip-bomb的侵害。那么,有什么方法(代码)不提取就可以检查ZIP内容的大小?

因此,即伪代码:

$size = size_of_contents_of_zip( $file );
if ( $size < 10MB )
{
    Extract_Zip( $file );
}
else{
   // report_user_as_malicious();
}

0 个答案:

没有答案
相关问题