SVG Upload to WordPress Issue

So I added this code to my Functions.php file and all of a sudden I can upload SVG's across my entire server, all m

So I added this code to my Functions.php file and all of a sudden I can upload SVG's across my entire server, all my clients websites.

I know there are security disclaimers regarding using this code.

function cc_mime_types($mimes) {
 $mimes['svg'] = 'image/svg+xml';
 return $mimes;
}
add_filter('upload_mimes', 'cc_mime_types');

Anyone have any idea why this is possible for all my clients and not just the one website I put the code onto? Is this something I should be worried about?

So I added this code to my Functions.php file and all of a sudden I can upload SVG's across my entire server, all my clients websites.

I know there are security disclaimers regarding using this code.

function cc_mime_types($mimes) {
 $mimes['svg'] = 'image/svg+xml';
 return $mimes;
}
add_filter('upload_mimes', 'cc_mime_types');

Anyone have any idea why this is possible for all my clients and not just the one website I put the code onto? Is this something I should be worried about?

Share Improve this question edited Apr 29, 2020 at 22:28 Anthony Valentine asked Apr 29, 2020 at 20:56 Anthony ValentineAnthony Valentine 53 bronze badges 6
  • I don't understand your question: First you say it's working for all clients, and then it's not? Please clarify. And welcome to WordPress Stack Exchange! – fuxia Commented Apr 29, 2020 at 21:51
  • Yes, I'm new here! Thank you. I edited the question a bit. I just don't understand how I added the code to one website and now all of the sudden I can upload SVG's on every one of my websites across my server. – Anthony Valentine Commented Apr 29, 2020 at 22:35
  • Are your client's sites part of a multisite with your site? – Jacob Peattie Commented Apr 30, 2020 at 0:23
  • Unfortunately, no. – Anthony Valentine Commented Apr 30, 2020 at 1:53
  • Maybe they are all using the same theme directory. Otherwise it can't happen. – fuxia Commented Apr 30, 2020 at 2:49
 |  Show 1 more comment

1 Answer 1

Reset to default 0

I've established this is a plugin/theme conflict. I will report back when I know more.

I tested this on a couple of my other client's websites that are on different servers but share similar themes/plugins, and sure enough, I can upload SVGs.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744514784a4578208.html

相关推荐

  • SVG Upload to WordPress Issue

    So I added this code to my Functions.php file and all of a sudden I can upload SVG's across my entire server, all m

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信