PHP Security
PHP Security - Important Points
11. | What is a Remote Code Execution vulnerability? |
---|
A. A vulnerability that allows an attacker to execute arbitrary code on a system
B. A vulnerability that allows an attacker to include a file from a remote server
C. A vulnerability that allows an attacker to bypass authentication
D. A vulnerability that allows an attacker to delete files on a system
View Answer Discuss Work SpaceAnswer: option a
Explanation:
12. | Which of the following is a method to prevent Remote Code Execution vulnerabilities in PHP? |
---|
A. Using SSL encryption
B. Restricting access to sensitive files
C. Using the extract() function
D. Input validation and sanitization
View Answer Discuss Work SpaceAnswer: option d
Explanation:
13. | What is the purpose of the htmlentities() function in PHP? |
---|
A. To convert special characters to HTML entities
B. To encrypt data before storing it in a database
C. To hash passwords before storing them in a database
D. To validate user input
View Answer Discuss Work SpaceAnswer: option a
Explanation:
14. | Which of the following is a method to prevent brute-force attacks on user passwords in PHP? |
---|
A. Using SSL encryption
B. Storing passwords in plaintext
C. Allowing unlimited login attempts
D. Using password hashing and salting
View Answer Discuss Work SpaceAnswer: option d
Explanation:
15. | What is the purpose of the password_hash() function in PHP? |
---|
A. To encrypt data before storing it in a database
B. To hash passwords before storing them in a database
C. To validate user input
D. To convert special characters to HTML entities
View Answer Discuss Work SpaceAnswer: option b
Explanation: