webtrees
webtrees copied to clipboard
SyntaxError: Unexpected token < in JSON at position 0 Modsecurity whitelisting rule 930110 and 949110
Greg, you asked "I'm curious to know why this particular file upload is blocked." when I was successful in whitelisting 2 rules via my webhost Namecheap.com. The Forum link: https://www.webtrees.net/index.php/en/forum/help-for-release-2-1-x/37197-error-on-uploading-media-file-syntaxerror-unexpected-token-in-json-at-posit#93916
Modsecurity did not recommend whitelisting 949110 because that essentially turned off a good proportion of Modsecurity. So Namecheap.com reactivated 949110 and the media upload in question still works.
The link for the code of rule 930110 is here https://github.com/coreruleset/coreruleset/blob/v3.3/master/rules/REQUEST-930-APPLICATION-ATTACK-LFI.conf#L49-L71
The media file I was having trouble with (it is not every media file) is attached.
You don't have to respond to this issue because I probably won't understand it anyway. I choose to write here rather in the webtrees Forum just for privacy issues. I hope this helps. Sorry that what I whitelisted did not help Tim who was the original poster on the Forum. ~doug
The rule says that one of the HTTP request parameters contains the text /../
.
Do any of your settings, etc. contain this text?
None of my settings, etc., contain this text.
Others have figured this out. See https://www.webtrees.net/index.php/en/forum/help-for-release-2-1-x/37197-error-on-uploading-media-file-syntaxerror-unexpected-token-in-json-at-posit?start=0