ASM::captcha¶
Description¶
Responds to the client with a CAPTCHA challenge. Note although ASM will
send the CAPTCHA challenge screen back to the user, the enforcement is
not always done automatically. To enforce the correct CAPTCHA response,
the ASM::captcha_status command should be used. Return values:
- “ok” - CAPTCHA challenge was sent successfully
- “nok asm blocked request” - CAPTCHA challenge was not sent, because a blocking page action was performed
- “nok asm uncaptcha command was raised” - CAPTCHA challenge was not sent, because uncaptcha command was called
- “nok request unqualified for captcha” - CAPTCHA challenge was not sent, because request is not qualified for CAPTCHA action
Examples¶
# This example counts the number of violations, and if it exceeds 3,
# it issues a CAPTCHA action.
when ASM_REQUEST_DONE {
if {[ASM::violation count] > 3 and [ASM::severity] eq "Error"} {
ASM::captcha
}
}