Did you find the specific firewall rule which is causing that behaviour? If so which is it?
I haven’t narrowed it down yet, but I’ve eliminated some possibilities.
It seems to be a sub-rules that can tell the difference between
http://www.domain.com/gallery and
domain.com/gallery.
The firewall rule is blocking anything with the full domain name in it, but without the www part, it slips by somehow.
I don’t see anything specifically in the firewall rules, though. I have Basic engaged.
It’s not Directory Contents, that works.
It’s not Trace and Track, that works.
Still trying things one by one.
Have eliminated:
Basic
– Basic firewall
– XMLRPC
– Pingback
– Debug log
Advanced
– Directory contents
– Trace and Track
– Proxy Comment Posting
– Advanced Character String Filter
AH-HAH! It conflicts with the bad query string setting.
PolyWogg
Hi @polywogg, I am glad you found the conflicting settings.
The following information is added in the plugin by the developers in regards to this feature.
This feature will write rules in your .htaccess file to prevent malicious string attacks on your site using XSS.
NOTE: Some of these strings might be used for plugins or themes and hence this might break some functionality.
You are therefore strongly advised to take a backup of your active .htaccess file before applying this feature.
The following is written to the .htaccess file. You might like to investigate what part of the following code is causing the conflict.
#AIOWPS_DENY_BAD_QUERY_STRINGS_START
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ftp: [NC,OR]
RewriteCond %{QUERY_STRING} http: [NC,OR]
RewriteCond %{QUERY_STRING} https: [NC,OR]
RewriteCond %{QUERY_STRING} mosConfig [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(globals|encode|localhost|loopback).* [NC,OR]
RewriteCond %{QUERY_STRING} (\;|'|\"|%22).*(request|insert|union|declare|drop) [NC]
RewriteRule ^(.*)$ - [F,L]
</IfModule>
#AIOWPS_DENY_BAD_QUERY_STRINGS_END
During the investigation, simply disable this feature. If you can’t work out what part of the code is causing this conflict, you will have to make sure you don’t enable this feature in the plugin. If you do find out what part of the code is conflicting, then you can add the amended code to the Custom Rules tab under Firewall.
Let us know if you need more help.
Kind regards
-
This reply was modified 8 years, 4 months ago by
mbrsolution.
Awesome, thanks. If I had to guess, I would say it is
RewriteCond %{QUERY_STRING} ^.*(globals|encode|localhost|loopback).* [NC,OR]
as it does seem to just go into an infinite loop (if I’m understanding what that command does). And it kind of seems to match a bit…if I do http://www.mydomain.com, it would match “localhost” in that list. However, if I do mydomain.com, it doesn’t seem to match it, and so it lets it through. Again, if I understand that command properly (no guarantees!).
In the meantime, rather than add the rule, which might get me messed up, I think I’ll just leave that part alone 🙂 It’s working, it’s all good.
Thanks again. I wish I had found the error 3 years ago when it first “appeared”. If I hadn’t switched to AIO recently, and found the same bug when I reinstalled Piwigo and started using it again, I never would have been able to narrow it down. Worst case scenario now, if someone has the same error, they might trip over the posts and find the problem/solution.
PolyWogg
I am glad to see that you have found a workaround/ solution for your issue. I will mark this support thread as resolved.
You are most welcome to open up another ticket in the future if you wish to revisit this issue again and perhaps even point to this support thread.
Enjoy the plugin.
Kind regards