Skip to content

Commit

Permalink
Add More Allowed File Extensions
Browse files Browse the repository at this point in the history
`json`, `jsonp`, `xml`
  • Loading branch information
taufik-nurrohman committed Aug 15, 2014
1 parent 6cef154 commit eda63ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manager/workers/route.shield.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
if(File::exist(SHIELD . DS . $folder . DS . $path)) {
Notify::error(Config::speak('notify_file_exist', array('<code>' . $path . '</code>')));
}
$accepted_extensions = array('css', 'html', 'js', 'php', 'txt');
$accepted_extensions = array('css', 'html', 'js', 'json', 'jsonp', 'php', 'txt', 'xml');
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
if( ! in_array($extension, $accepted_extensions)) {
Notify::error(Config::speak('notify_error_file_extension', array($extension)));
Expand Down Expand Up @@ -180,7 +180,7 @@
if($path != $name && File::exist(SHIELD . DS . $folder . DS . $name)) {
Notify::error(Config::speak('notify_file_exist', array('<code>' . $name . '</code>')));
}
$accepted_extensions = array('css', 'html', 'js', 'php', 'txt');
$accepted_extensions = array('css', 'html', 'js', 'json', 'jsonp', 'php', 'txt', 'xml');
$extension = strtolower(pathinfo($name, PATHINFO_EXTENSION));
if( ! in_array($extension, $accepted_extensions)) {
Notify::error(Config::speak('notify_error_file_extension', array($extension)));
Expand Down

0 comments on commit eda63ae

Please sign in to comment.