Hi,
I have a question about Protector 3.15
ファイルアップロード時に二重拡張子(eg; data.sample.csv)などをアップロードするとProtectorが強制終了してしまうようです。
ログを確認すると次のメッセージが出てました。
Quote:
UPLOAD Attempt to multiple dot file data.sample.csv
二重拡張子アップロードでエラーが出ないようにするには
[一般設定]の[実行可能ファイルアップロードによる強制終了]を「いいえ」にしないといけないとどこかで読みました。
しかしこれではPHPファイルなどのアップロードがあった場合困ります。
二重拡張子を許可する場合は
XOOPS_TRUST_PATH/modules/protecter/protecter.phpのfunction check_uploaded_files(l.583あたり)の
// anti multiple dot file (Apache mod_mime.c)
if( count( explode( '.' , str_replace( '.tar.gz' , '.tgz' , $_file['name'] ) ) ) > 2 ) {
$this->message .= "Attempt to multiple dot file {$_file['name']}.\n" ;
$this->_safe_badext = false ;
$this->last_error_type = 'UPLOAD' ;
}
をコメントアウトすれば解決できそうなのですが、これによって何らかの良くない影響があると思われますか。
宜しくお願いいたします。
---sorry, I try repost in English
If I upload a Multiple dot file, Protector shuts down.
eg) data.sample.csv
Protector logs shows a message below;
Quote:
UPLOAD Attempt to multiple dot file data.sample.csv
Solving this trouble, I need change "Exit if bad files are uploaded" to "No".
I guess this changing brings on some more trouble.
I'd try to comment out check_uploaded_files(around l.583) in file XOOPS_TRUST_PATH/modules/protecter/protecter.php
// anti multiple dot file (Apache mod_mime.c)
if( count( explode( '.' , str_replace( '.tar.gz' , '.tgz' , $_file['name'] ) ) ) > 2 ) {
$this->message .= "Attempt to multiple dot file {$_file['name']}.\n" ;
$this->_safe_badext = false ;
$this->last_error_type = 'UPLOAD' ;
}
Do you think this changing is not good or brings on some more trouble?