Question

PHP What issues (name at least 3) that need to be addressed when uploading a file...

PHP

What issues (name at least 3) that need to be addressed when uploading a file to a website?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The following issues need to be focused while uploading a file to a website using PHP

1. Check the Information (File content ) provided from the Client to the Webserver The MIME type of the HTTP request which describes the content of the file being uploaded may not be true always and we need to check the exact contents of the file using PHP functions. Eg. if the MIME type mentions that the file contains image, we need to check it using getimagesize(), if it returns the  size of the image then its a valid image file else its a suspicious file.

2. Check the size of the Uploaded File The size of the file should be checked and should be as per the required range/limit so that the user will not upload too big or a too small file .   

3. Log details Everytime a file is uploaded to the webserver, make sure to log and keep a copy of the client details such as clients time, IP address, username and other relevant details so that you will be aware if in case of any vulnerable attacks or threats by the client side.

4. Error Message Content Make sure not to reveal much details about the webserver while displaying a Error message to the client/user.

Add a comment
Know the answer?
Add Answer to:
PHP What issues (name at least 3) that need to be addressed when uploading a file...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT