Skip to content
Permalink
Browse files Browse the repository at this point in the history
Updated file types table to only allow admins to upload files with SW…
…F extension
  • Loading branch information
winskie committed Jan 15, 2017
1 parent 30990e0 commit 261dbd5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conf/_application.php
Expand Up @@ -36,7 +36,7 @@
*
* {@internal Before changing this in CVS, it should be discussed! }}
*/
$new_db_version = 11810;
$new_db_version = 11815;

/**
* Minimum PHP version required for b2evolution to function properly. It will contain each module own minimum PHP version as well.
Expand Down
2 changes: 1 addition & 1 deletion install/_functions_create.php
Expand Up @@ -448,7 +448,7 @@ function create_default_data()
(17, 'mov', 'Quicktime video', 'video/quicktime', 'file_video', 'browser', 'registered'),
(18, 'm4v', 'MPEG video file', 'video/x-m4v', 'file_video', 'browser', 'registered'),
(19, 'flv', 'Flash video file', 'video/x-flv', 'file_video', 'browser', 'registered'),
(20, 'swf', 'Flash video file', 'application/x-shockwave-flash', 'file_video', 'browser', 'registered'),
(20, 'swf', 'Flash video file', 'application/x-shockwave-flash', 'file_video', 'browser', 'admin'),
(21, 'webm', 'WebM video file', 'video/webm', 'file_video', 'browser', 'registered'),
(22, 'ogv', 'Ogg video file', 'video/ogg', 'file_video', 'browser', 'registered'),
(23, 'm3u8', 'M3U8 video file', 'application/x-mpegurl', 'file_video', 'browser', 'registered'),
Expand Down
8 changes: 8 additions & 0 deletions install/_functions_evoupgrade.php
Expand Up @@ -7592,6 +7592,14 @@ function add_basic_widget_11670( $blog_ID, $container_name, $code, $type, $order
upg_task_end();
}

if( upg_task_start( 11815, 'Updating file types table...' ) )
{ // part of 6.7.10-stable
$DB->query( 'UPDATE T_filetypes
SET ftyp_allowed = "admin"
WHERE ftyp_extensions REGEXP "[[:<:]]swf[[:>:]]"' );
upg_task_end();
}

/*
* ADD UPGRADES __ABOVE__ IN A NEW UPGRADE BLOCK.
*
Expand Down

0 comments on commit 261dbd5

Please sign in to comment.