Forum Discussion

roogle's avatar
roogle
Icon for Nimbostratus rankNimbostratus
Oct 24, 2018

Block empty query using ASM.

Hello,

 

We've seen numerous requests to our application that contain an empty query string at the root directory i.e. https://www.domain.com/? I'd like to block them.

 

Currently there is an iRule in place to stop this type of request:

 

{ [HTTP::uri] equals "/?"}

 

We'd like to move the blocking of this type of request from an iRule to ASM. So far I have the following signature:

 

uricontent:"/?"; re2:"/\s\/\?\s/";

 

I can't work out a way of saying exact matches using ASM signatures in the same way as is done with the iRule. The only way I could find of completing the task was to look for the whitespace on either side of the /? in the request.

 

Can anyone think of better syntax for the signature, or a built in feature of ASM that I have missed, for completing this task?

 

Thanks.

 

No RepliesBe the first to reply