<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Transformation Functions :: WGE</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/index.html</link><description>Keyword Description t:none Clear transformation chain t:lowercase Convert to lowercase t:uppercase Convert to uppercase t:urlDecode URL decode t:urlDecodeUni Unicode URL decode t:urlEncode URL encode t:base64Decode Base64 decode t:base64DecodeExt Extended Base64 decode t:base64Encode Base64 encode t:cmdline Command line argument normalization t:hexDecode Hexadecimal decode t:hexEncode Hexadecimal encode t:htmlEntityDecode HTML entity decode t:jsDecode JavaScript decode t:cssDecode CSS decode t:escapeSeqDecode Escape sequence decode t:sqlHexDecode SQL hexadecimal decode t:removeNulls Remove null characters t:removeWhitespace Remove whitespace t:compressWhitespace Compress whitespace t:removeComments Remove comments t:removeCommentsChar Remove comment characters t:replaceComments Replace comments with space t:replaceNulls Replace null characters t:normalizePath Normalize path t:normalisePath Normalize path (British spelling) t:normalizePathWin Normalize Windows path t:normalisePathWin Normalize Windows path (British spelling) t:parityEven7bit 7-bit even parity decode t:parityOdd7bit 7-bit odd parity decode t:parityZero7bit 7-bit zero parity decode t:utf8ToUnicode UTF-8 to Unicode t:length Get string length t:md5 Calculate MD5 hash t:sha1 Calculate SHA1 hash t:trim Trim leading and trailing whitespace t:trimLeft Trim leading whitespace t:trimRight Trim trailing whitespace</description><generator>Hugo</generator><language>en</language><atom:link href="https://zhouyujt.github.io/wge/seclang-plus/transformation/index.xml" rel="self" type="application/rss+xml"/><item><title>t:none</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tnone/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tnone/index.html</guid><description>Description: Clears the transformation chain.
t:none clears all transformation functions that appear before t:none in the transformation chain. After using t:none, only transformation functions explicitly specified after it will be applied.
Syntax: t:none
Implemented: Yes
Example:
# Assume default action includes t:lowercase,t:urlDecode SecDefaultAction "phase:2,log,pass,t:lowercase,t:urlDecode" # This rule inherits default transformations SecRule ARGS "@rx admin" "id:1,deny,msg:'admin detected'" # Use t:none to clear default transformations, apply only t:base64Decode SecRule ARGS:encoded "@rx admin" \ "id:2,t:none,t:base64Decode,deny,msg:'admin detected in Base64'" # Apply no transformations at all SecRule REQUEST_BODY "@rx ^\{" \ "id:3,t:none,pass,setvar:tx.is_json=1"</description></item><item><title>t:lowercase</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tlowercase/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tlowercase/index.html</guid><description>Description: Converts uppercase characters to lowercase in a string.
Syntax: t:lowercase
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:lowercase"</description></item><item><title>t:uppercase</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tuppercase/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tuppercase/index.html</guid><description>Description: Converts lowercase characters to uppercase in a string.
Syntax: t:uppercase
Implemented: No
WGE can parse this transformation function, but the functionality is not yet implemented.</description></item><item><title>t:urlDecode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/turldecode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/turldecode/index.html</guid><description>Description: Performs URL decoding on a string.
This transformation function performs URL decoding on the input string. Invalid encodings will be skipped without affecting the decoding of the remaining valid encodings.
Syntax: t:urlDecode
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:urlDecode"</description></item><item><title>t:urlDecodeUni</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/turldecodeuni/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/turldecodeuni/index.html</guid><description>Description: Performs URL decoding on a string.
This transformation function is similar to t:urlDecode, but adds support for Microsoft-specific %u encoding. If the code point is in the FF01-FF5E range (fullwidth ASCII), the high byte is used to detect and adjust the low byte. Otherwise, only the low byte is used and the high byte is zeroed.
Syntax: t:urlDecodeUni
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:urlDecodeUni"</description></item><item><title>t:urlEncode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/turlencode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/turlencode/index.html</guid><description>Description: Performs URL encoding on a string.
Syntax: t:urlEncode
Implemented: No
WGE can parse this transformation function, but the functionality is not yet implemented.</description></item><item><title>t:base64Decode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tbase64decode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tbase64decode/index.html</guid><description>Description: Decodes a Base64-encoded string.
Syntax: t:base64Decode
Implemented: Yes
Example:
# Detect Base64-encoded attack payloads SecRule ARGS:data "@rx (eval|exec|system)" \ "id:1,phase:2,t:base64Decode,deny,msg:'Base64-encoded code execution detected'" # Original input: ZXZhbChiYXNlNjRfZGVjb2RlKCR4KSk= # After decoding: eval(base64_decode($x))</description></item><item><title>t:base64DecodeExt</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tbase64decodeext/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tbase64decodeext/index.html</guid><description>Description: Decodes a Base64-encoded string.
Similar to t:base64Decode, but this transformation function uses a lenient implementation that ignores invalid characters.
Syntax: t:base64DecodeExt
Implemented: No
WGE can parse this transformation function, but the functionality is not yet implemented.</description></item><item><title>t:base64Encode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tbase64encode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tbase64encode/index.html</guid><description>Description: Encodes a string using Base64.
Syntax: t:base64Encode
Implemented: No
WGE can parse this transformation function, but the functionality is not yet implemented.</description></item><item><title>t:cmdline</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tcmdline/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tcmdline/index.html</guid><description>Description: Normalizes a string as command line arguments.
This transformation function processes the input string in the following ways:
Remove all backslashes \ Remove all double quotes " Remove all single quotes ' Remove all carets ^ Remove spaces before slashes / Remove spaces before left parentheses ( Replace commas , and semicolons ; with spaces Compress consecutive whitespace (including tabs, newlines) into a single space Convert characters to lowercase Syntax: t:cmdline</description></item><item><title>t:hexDecode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/thexdecode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/thexdecode/index.html</guid><description>Description: Decodes a hexadecimal-encoded string.
Syntax: t:hexDecode
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:hexDecode"</description></item><item><title>t:hexEncode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/thexencode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/thexencode/index.html</guid><description>Description: Encodes a string using hexadecimal encoding.
Syntax: t:hexEncode
Implemented: Yes
Example:
SecRule ARGS "@rx 74657374" "id:1001,t:hexEncode" # test encoded with hexEncode becomes 74657374</description></item><item><title>t:htmlEntityDecode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/thtmlentitydecode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/thtmlentitydecode/index.html</guid><description>Description: Decodes HTML entity escape sequences in a string.
Syntax: t:htmlEntityDecode
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:htmlEntityDecode"</description></item><item><title>t:jsDecode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tjsdecode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tjsdecode/index.html</guid><description>Description: Decodes JavaScript escape sequences in a string.
If the \uHHHH code point is in the FF01-FF5E range (fullwidth ASCII), the high byte is used to detect and adjust the low byte. Otherwise, only the low byte is used and the high byte is zeroed (which may result in information loss).
Syntax: t:jsDecode
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:jsDecode"</description></item><item><title>t:cssDecode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tcssdecode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tcssdecode/index.html</guid><description>Description: Decodes CSS escape sequences in a string.
Syntax: t:cssDecode
Implemented: Yes
Example:
# Detect CSS injection attacks SecRule ARGS "@rx expression|javascript" \ "id:1,phase:2,t:cssDecode,t:lowercase,deny,msg:'CSS injection detected'" # Original input: \65\78\70\72\65\73\73\69\6f\6e (CSS-encoded "expression") # After decoding: expression</description></item><item><title>t:escapeSeqDecode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tescapeseqdecode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tescapeseqdecode/index.html</guid><description>Description: Decodes ANSI C escape sequences in a string back to their actual characters.
This transformation function decodes ANSI C escape sequences: \a, \b, \f, \n, \r, \t, \v, \, ?, ', ", \xHH (hexadecimal), and \0OOO (octal). Invalid encodings are preserved in the output unchanged.
Syntax: t:escapeSeqDecode
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:escapeSeqDecode"</description></item><item><title>t:sqlHexDecode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tsqlhexdecode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tsqlhexdecode/index.html</guid><description>Description: Decodes SQL hexadecimal data in a string.
Syntax: t:sqlHexDecode
Implemented: No
WGE can parse this transformation function, but the functionality is not yet implemented.</description></item><item><title>t:removeNulls</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tremovenulls/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tremovenulls/index.html</guid><description>Description: Removes NULL characters from a string.
This transformation function removes all NULL (0x00) characters from the input string.
Syntax: t:removeNulls
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:removeNulls"</description></item><item><title>t:removeWhitespace</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tremovewhitespace/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tremovewhitespace/index.html</guid><description>Description: Removes whitespace characters from a string.
This transformation function removes all \x20\f\t\n\r\v\xA0 characters from the input string.
Syntax: t:removeWhitespace
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:removeWhitespace"</description></item><item><title>t:compressWhitespace</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tcompresswhitespace/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tcompresswhitespace/index.html</guid><description>Description: Compresses whitespace in a string, reducing consecutive spaces to a single space.
This transformation function processes the input string in the following ways:
Converts all whitespace characters (including 0x20, \f, \t, \n, \r, \v, 0xa0) to spaces Compresses consecutive spaces into a single space Syntax: t:compressWhitespace
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:compressWhitespace"</description></item><item><title>t:removeComments</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tremovecomments/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tremovecomments/index.html</guid><description>Description: Removes comment blocks from a string.
This transformation function removes the following comment blocks from the input string:
/**/ &lt;!----> -- # Syntax: t:removeComments
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:removeComments"</description></item><item><title>t:removeCommentsChar</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tremovecommentschar/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tremovecommentschar/index.html</guid><description>Description: Removes comment characters from a string.
This transformation function removes the following comment characters from the input string:
-- # /* */ &lt;!-- Syntax: t:removeCommentsChar
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:removeCommentsChar"</description></item><item><title>t:replaceComments</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/treplacecomments/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/treplacecomments/index.html</guid><description>Description: Replaces comment blocks in a string with spaces.
This transformation function replaces comment blocks enclosed by /**/ in the input string with spaces. Incomplete comments are also replaced with a single space. However, standalone comment terminators (*/) are not affected.
Syntax: t:replaceComments
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:replaceComments"</description></item><item><title>t:replaceNulls</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/treplacenulls/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/treplacenulls/index.html</guid><description>Description: Replaces NULL (0x00) characters in a string with spaces.
This transformation function replaces all NULL characters in the input string with space characters (ASCII 0x20).
Syntax: t:replaceNulls
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:replaceNulls"</description></item><item><title>t:normalizePath</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tnormalizepath/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tnormalizepath/index.html</guid><description>Description: Normalizes Linux path in a string.
Same as t:normalisePath.
Syntax: t:normalizePath
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:normalizePath"</description></item><item><title>t:normalisePath</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tnormalisepath/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tnormalisepath/index.html</guid><description>Description: Normalizes Linux path in a string.
This transformation function normalizes the input string by removing consecutive slashes, current directory references (.), and parent directory references (..), except when located at the beginning of the string.
Syntax: t:normalisePath
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:normalisePath"</description></item><item><title>t:normalizePathWin</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tnormalizepathwin/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tnormalizepathwin/index.html</guid><description>Description: Normalizes Linux path in a string.
Same as t:normalisePathWin.
Syntax: t:normalizePathWin
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:normalizePathWin"</description></item><item><title>t:normalisePathWin</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tnormalisepathwin/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tnormalisepathwin/index.html</guid><description>Description: Normalizes Windows path in a string.
This transformation function is similar to t:normalisePath, but first converts all backslashes \ to forward slashes /.
Syntax: t:normalisePathWin
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:normalisePathWin"</description></item><item><title>t:parityEven7bit</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tparityeven7bit/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tparityeven7bit/index.html</guid><description>Description: Calculates even parity bit based on 7-bit data and overwrites the 8th bit of each target byte with the calculated parity bit.
Syntax: t:parityEven7bit
Implemented: No
WGE can parse this transformation function, but the functionality is not yet implemented.</description></item><item><title>t:parityOdd7bit</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tparityodd7bit/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tparityodd7bit/index.html</guid><description>Description: Calculates odd parity bit based on 7-bit data and overwrites the 8th bit of each target byte with the calculated parity bit.
Syntax: t:parityOdd7bit
Implemented: No
WGE can parse this transformation function, but the functionality is not yet implemented.</description></item><item><title>t:parityZero7bit</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tparityzero7bit/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tparityzero7bit/index.html</guid><description>Description: Forces the 8th bit of each target byte to zero (zero parity bit) based on 7-bit data, allowing 7-bit data containing odd/even parity bits to be inspected as ASCII7 data.
Syntax: t:parityZero7bit
Implemented: No
WGE can parse this transformation function, but the functionality is not yet implemented.</description></item><item><title>t:utf8ToUnicode</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tutf8tounicode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tutf8tounicode/index.html</guid><description>Description: Performs Unicode encoding on UTF-8 character sequences in a string.
This transformation function converts all UTF-8 character sequences in the input string to Unicode (using %uHHHH format).
Syntax: t:utf8ToUnicode
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:utf8ToUnicode"</description></item><item><title>t:length</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tlength/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tlength/index.html</guid><description>Description: Calculates the length of a string.
Syntax: t:length
Implemented: Yes
Example:
SecRule ARGS "@rx 128" "id:1001,t:length"</description></item><item><title>t:md5</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tmd5/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tmd5/index.html</guid><description>Description: Calculates the MD5 hash of a string.
Syntax: t:md5
Implemented: No
WGE can parse this transformation function, but the functionality is not yet implemented.</description></item><item><title>t:sha1</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/tsha1/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/tsha1/index.html</guid><description>Description: Calculates SHA1 hash of a string.
Syntax: t:sha1
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:sha1"</description></item><item><title>t:trim</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/ttrim/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/ttrim/index.html</guid><description>Description: Removes leading and trailing whitespace from a string.
This transformation function removes \x20\t\n\r\f\v characters from the beginning and end of the input string.
Syntax: t:trim
Implemented: Yes
Example:
SecRule ARGS "@rx test" "id:1001,t:trim"</description></item><item><title>t:trimLeft</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/ttrimleft/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/ttrimleft/index.html</guid><description>Description: Removes leading whitespace from a string.
This transformation function removes \x20\t\n\r\f\v characters from the beginning of the input string.
Syntax: t:trimLeft
Implemented: Yes
Example:
# Detect after trimming leading whitespace from parameter SecRule ARGS:username "@rx ^admin" \ "id:1,phase:2,t:trimLeft,deny,msg:'admin username detected'" # Original input: " admin" # After processing: "admin"</description></item><item><title>t:trimRight</title><link>https://zhouyujt.github.io/wge/seclang-plus/transformation/ttrimright/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhouyujt.github.io/wge/seclang-plus/transformation/ttrimright/index.html</guid><description>Description: Removes trailing whitespace from a string.
This transformation function removes \x20\t\n\r\f\v characters from the end of the input string.
Syntax: t:trimRight
Implemented: Yes
Example:
# Detect after trimming trailing whitespace from parameter SecRule ARGS:cmd "@rx ;$" \ "id:1,phase:2,t:trimRight,deny,msg:'Command separator detected'" # Original input: "ls -la; " # After processing: "ls -la;"</description></item></channel></rss>