Security
INEX SPA - Security System Documentation
π‘οΈ Feature: Security System
The Security system in INEX SPA is designed to help developers easily protect their apps from common vulnerabilities. It provides essential functions to manually validate, clean, and verify user input and behavior.
π οΈ Enable Security System
To enable the Security system, open your .env file and set:
USE_SECURITY=trueOnce enabled, you can use the Security class manually in your PHP files.
π Files and Structure
Security Class:
/core/functions/PHP/classes/Security.php
βοΈ Security Functions
β€ Security::sanitizeInput($string)
Cleans a string from common XSS (Cross-site Scripting) attacks.
Example:
This function removes or neutralizes harmful tags and scripts.
β€ Security::validateAndSanitize($input, $type)
Validates and sanitizes based on the type provided.
$typecurrently supports only'xss'
Example:
β
Use Cases
Cleaning user input before displaying it.
Preventing script injection in forms, URLs, comments, etc.
Adding a layer of safety when rendering dynamic content.
π Notes
This system only runs if
USE_SECURITY=trueis set in.env.Designed to be used manually where needed.
Does not interfere with data unless you call it.
Currently supports only XSS protection.
Future updates may include CSRF token validation, header checks, and file upload protection.
β
Status
β Lightweight β Easy to configure β Extensible β No external libraries
Β© INEX SPA Team - Security System
Last updated