Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Controller/VideoFilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

App::uses('Controller', 'Controller');
App::uses('Current', 'NetCommons.Utility');
App::uses('NetCommonsSecurity', 'NetCommons.Utility');

/**
* サムネイル、動画の表示 Controller
Expand Down Expand Up @@ -67,6 +68,10 @@ public function beforeFilter() {
* @throws NotFoundException 表示できない記事へのアクセス
*/
public function file() {
if (! (new NetCommonsSecurity())->enableBadIps()) {
throw new NotFoundException();
}

// ここから元コンテンツを取得する処理
$key = $this->params['key'];
$conditions = $this->Video->getConditions();
Expand Down Expand Up @@ -99,7 +104,7 @@ public function file() {
return $response;
} else {
// 表示できないなら404
throw new NotFoundException(__d('videos', 'Invalid video entry'));
throw new NotFoundException();
}
}
}