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
  • You need to implement a web application that is split in three parts, namely, Webpage, PHP and My...

    You need to implement a web application that is split in three parts, namely, Webpage, PHP and MySQL. Each of them will be used accordingly to solve a simple problem described below. Remember to implement the logic in the most secure way of your knowledge. PHP Implement a PHP function that reads in input a string from the user and store it in a table (e.g., in a field called "Content Name"). The function should be able to read the...

  • PHP : I need to make a table in database that holds three fields.  A unique key, a name, and an email. then I have to...

    PHP : I need to make a table in database that holds three fields.  A unique key, a name, and an email. then I have to make two PHP files.  One of those files has a form with two fields that allow the user to enter their name and email.  This file then enters that data into the database table and acknowledges the entry. The second PHP file does a query on that database and prints out a table with ...

  • PHP you need to create a form to allow the user to enter their name, email,...

    PHP you need to create a form to allow the user to enter their name, email, and address information. That information will be sent to a PHP script that will process and display that information. Your assignment should have two pages. The first page is straight html (user_input.html) that has a form with the appropriate form elements to collect the user input. The form should then be submitted using the POST method to a php script (display_user_info.php) that will process...

  • Use php Create a file to write a program of 30 city name and populations Using...

    Use php Create a file to write a program of 30 city name and populations Using two files Print using associative array Output should be like Cities: Name. Population Daka. 13 millions

  • PHP : I need to make a table in database that holds three fields.  A unique...

    PHP : I need to make a table in database that holds three fields.  A unique key, a name, and an email. then I have to make two PHP files.  One of those files has a form with two fields that allow the user to enter their name and email.  This file then enters that data into the database table and acknowledges the entry. The second PHP file does a query on that database and prints out a table with two...

  • Using PHP and MYSQL create a form that: user Full name user Comment (as many lines...

    Using PHP and MYSQL create a form that: user Full name user Comment (as many lines as they want) allows the user to attach one image uploads the Full name, comment, and image to a database Displays the user's full name, comment and user image on the website by selecting them from the database. Include the server connection file as well any necessary codes to connect and maintain the database

  • Create a folder named "TrainerApp". In that folder create the following files. Create a PHP file,...

    Create a folder named "TrainerApp". In that folder create the following files. Create a PHP file, "insert-user-form.php", with a form that has the following fields: - First Name (text) - Last Name (text) - Email (text) - Password (text) - Submit button Create another PHP file, "insert-exercise-form.php" with a form that has the following fields: - Exercise Name (text) - Description (text) - Demonstration Image (file) - Submit button Create another PHP file, "login-user-form.php" with a form that has the...

  • there are many issues that can be addressed when performing a RCA. Assuming that there is...

    there are many issues that can be addressed when performing a RCA. Assuming that there is a problem of appointment wait times at a physician's office setting, please share your thoughts and experiences on how you would address this issue using the RCA concept, plus describe which techniques you might apply and why.

  • What are the pathophysiology issues that must be addressed due to changes at the cellular level?

    What are the pathophysiology issues that must be addressed due to changes at the cellular level?

  • Hi c++ programming qs.. I am uploading my code and my output file result.. Actually I...

    Hi c++ programming qs.. I am uploading my code and my output file result.. Actually I need help in arranging my result in the grade part and score part as it looks in the name part outputFile setw (5) "NAME se tw(21) k< "SCORE setw(7) "GRADE" endl. for (int i 0; i 20; it+) outputFile left setw(5) students Information[i].student LName students Information[i].studentFName right right setw (10) studentsInformation [i].testscore setw(6)<<left students Information[i] endl;

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