Lucee Function Reference

sanitize()

Detects and masks sensitive information (such as passwords, API keys, tokens, etc.) from a given string.
The function identifies patterns commonly used for sensitive data and replaces them with a mask.

Example

sanitize(string text,[string replacement]):string

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
text string  Yes   The input string to be sanitized.  
replacement string  No **** The replacement string to use as a mask for sensitive data. If not specified, defaults to "****".