Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
Bug #93, fix for security vulnerability in Timedtext controller
Browse files Browse the repository at this point in the history
  • Loading branch information
nfreear committed Jul 12, 2019
1 parent 6ea6528 commit 3f39f2d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions application/controllers/timedtext.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ public function webvtt() {
$this->_error("Error, 'url' is a required parameter.", 400);
}

// Security.
if (! preg_match('@^https?:\/\/podcast.open.ac.uk\/@', $ttml_url)) {
$this->_error("Error, bad 'url' parameter.", 400);
return;
}

$p = parse_url($ttml_url);


Expand Down

0 comments on commit 3f39f2d

Please sign in to comment.