Acl regex problem with "?" in URL

Hi,

I have a problem with a regex to verify an URL.

I use this acl :

acl sign path_reg /signature/state?status=[a-zA-Z0-9]*$

I have a problem with the caracter “?” when I try (http://try.org/signature/state?status=666), the ACL is not accepted.

For test, I try
acl sign path_reg /signature/state.status=[a-zA-Z0-9]*$

URL : http://try.org/signature/state*status=666 => ACL OK => go to the backend
URL : http://try.org/signature/state?status=666 => ACL KO

Do you know how I can resolve this problem ?

Thanks in advance.

Regards

Thats what path is:

This extracts the request’s URL path, which starts at the first slash and
ends before the question mark

You probably need url instead.

Ok thanks.
I’m going to test wtith url_reg

This was the cause of my problem.
With the use of url_reg, it works.

acl sign url_reg /signature/state?status=[a-zA-Z0-9]*$

Thank you very much.
Have a good day

1 Like