
Use htaccess rules to block.
goffy wrote:
hi
because I have currently a lot of spam registrations I checked my server access log and found one log very often:
Quote:57.141.0.19 - - 06/Dec/2024:21:33:35 +0100 "GET /modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/newbb/report.php?forum=18&topic_id=12229&post_id=66633 HTTP/1.0" 200 15200 "-" "meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)"
It seems that someone is using xoops_redirect to burden my system on the site, maybe to make spam registration possible, I dont know.
but my question: how to treat this problem? would it make sense to implement a filter to remove the additional xoops_redirect in order to avoid looping?
what do you think
# Detect multiple occurrences of xoops_redirect
SecRule ARGS_NAMES "@streq xoops_redirect" "chain,phase:2,deny,status:403,id:1000"
SecRule &ARGS_NAMES:xoops_redirect "@gt 1"
# Keep only the last xoops_redirect parameter
RewriteCond %{QUERY_STRING} xoops_redirect=([^&]+).*xoops_redirect=([^&]+)
RewriteRule ^(.*)$ $1?xoops_redirect=%2 [R=301,L]
57.141.0.19 - - 06/Dec/2024:21:33:35 +0100 "GET /modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/profile/user.php?xoops_redirect=/modules/newbb/report.php?forum=18&topic_id=12229&post_id=66633 HTTP/1.0" 200 15200 "-" "meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)"