give a security checklist for php developers
- User
give a security checklist for php developers
Assistant
PHP Security Checklist
- Validate and sanitize all user input
- Use prepared statements with parameterized queries
- Set proper HTTP security headers
- Implement CSRF protection with tokens
- Enable output escaping (htmlspecialchars)
- Use password_hash() for password storage
- Implement rate limiting on login attempts
- Keep PHP and all dependencies updated
- Configure proper file permissions
- Use HTTPS for all connections
- Disable error display in production
- Implement Content Security Policy
- Store sensitive configuration in environment variables
- Use session_regenerate_id() to prevent session fixation
- Validate file uploads thoroughly
- Implement proper logging for security events
Would you like me to explain any of these items in more detail?
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.