Security in Secure Custom Fields

In this article

Security is a core principle of Secure Custom Fields. This guide explains our security practices and how to implement them in your projects.

Core Security Principles

  1. Input Validation
    • All user input is validated
    • Type checking enforced
    • Sanitization applied appropriately
  2. Output Escaping
    • Context-aware escaping
    • HTML, attributes, and URLs handled separately
    • Custom escaping functions for specific needs
  3. Capability Checking
    • Granular permission system
    • Role-based access control
    • Custom capability support

Best Practices

When working with SCF:

  1. Always use provided escaping functions
  2. Check user capabilities before operations
  3. Validate all data before saving
  4. Use nonces for form submissions