Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blocked by modsecurity #8

Open
flexjoly opened this issue Oct 12, 2017 · 2 comments
Open

blocked by modsecurity #8

flexjoly opened this issue Oct 12, 2017 · 2 comments

Comments

@flexjoly
Copy link

Hi,

When posting the signature as SVG or dataUrl, modsecurity blocks it.

When posting as PNG the log says:
ModSecurity: Access denied with code 403 (phase 2). Pattern match "(asfunction|data|javascript|livescript|mocha|vbscript):" at ARGS:data_signature. [file "/usr/local/cwaf/rules/08_XSS_XSS.conf"] [line "223"] [id "212770"] [rev "5"] [msg "COMODO WAF: XSS Attack Detected||ourdomain.com|F|2"] [data "Matched Data: data: found within ARGS:data_signature: data:image/png;base64,ivborw0kg ...... [severity "CRITICAL"] [tag "CWAF"] [tag "XSS"]
For now we do a substring on the created string, to get rid of things like 'data:image/png;base64,'

It would be very helpfull, if the script could do this by itself.

Greetings, flexjoly

@kbwood
Copy link
Owner

kbwood commented Oct 13, 2017

If you strip of that portion of the value you wouldn't know what format it is (PNG or JPEG).

What is it that modsecurity is trying to block? Can you increase the specificity of the rule to allow data:image/png but not other data:?

@flexjoly
Copy link
Author

flexjoly commented Nov 8, 2017

Hi,
Thanks for your reply, sorry for my late response.

I know too little about modsecurity :-( Only that we need it and that it is annoying. I think the rule can be found by the id '212770'

It might help if the format and the raw-data are send in different variables, so it is not seen as a kind of an injection.

Greetz, flexjoly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants