Skip to content
Permalink
Browse files Browse the repository at this point in the history
Hardening: Remove the ability to upload JavaScript files for users wh…
…o do not have the `unfiltered_html` capability.

Built from https://develop.svn.wordpress.org/trunk@42261


git-svn-id: http://core.svn.wordpress.org/trunk@42090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
johnbillion committed Nov 29, 2017
1 parent f1de7e4 commit 67d03a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions wp-includes/functions.php
Expand Up @@ -2565,8 +2565,9 @@ function get_allowed_mime_types( $user = null ) {
if ( function_exists( 'current_user_can' ) )
$unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' );

if ( empty( $unfiltered ) )
unset( $t['htm|html'] );
if ( empty( $unfiltered ) ) {
unset( $t['htm|html'], $t['js'] );
}

/**
* Filters list of allowed mime types and file extensions.
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42260';
$wp_version = '5.0-alpha-42261';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

10 comments on commit 67d03a9

@Yusufali0377

This comment was marked as spam.

@Yusufali0377

This comment was marked as spam.

@Yusufali0377

This comment was marked as spam.

@Yusufali0377

This comment was marked as spam.

@Yusufali0377

This comment was marked as spam.

@Yusufali0377

This comment was marked as spam.

@Yusufali0377

This comment was marked as spam.

@Yusufali0377

This comment was marked as spam.

@johnbillion
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yusufali0377 This is not the place to test security vulnerabilities. Use your own repo.

@DP44

This comment was marked as off-topic.

Please sign in to comment.