A
A
alestro2016-09-29 20:53:05
Laravel
alestro, 2016-09-29 20:53:05

How to avoid security issues when uploading files by url?

At the moment, the functionality of loading images by url is required, before saving it to the server, I check it through this construction: How correct is this, and how can I avoid holes altogether? @exif_imagetype(Request::input('url')) === false

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
thorii, 2016-09-29
@thorii

  • Check response header
  • mime content type
Another getimagesize to use when checking

T
Tesla, 2016-09-30
@Tesla

First, never use @
Second, there is validation#rule-image

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question