Support

Admin Tools

#34083 Admin tools and Acymail error 403.

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Thursday, 24 December 2020 20:17 CST

Joso

Hi, I'm having trouble viewing emails sent with acymail, the site shows this error:

403 - This request is blocked by Admin Tools. Please change this message in the component's options. If you are the administrator of this site and have blocked your own IP address on accident please visit https://www.xxxx.it/administrator/[email protected] where [email protected] is the email address of your (Super User) account. This URL will only send you an email if the IP address from which you are accessing it is being blocked by Admin Tools. If you are not blocked no email will be sent; you don't need an email with instructions to unblock your IP if your IP is not blocked.

I checked that my IP was not banned from admin tools, and I also tried other IPs, but every time it shows me this message.

How can I solve?
I would have urgency.

Thanks
Regards

nicholas
Akeeba Staff
Manager

I will take a guess as to what is going on, based on experience, since I don't have the URL that got blocked. Go to Components, Admin Tools, Web Application Firewall, Configure WAF and set "Block template=foo site template switch" to No.

 

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Joso

Hi, I followed you indication, but nothing. Attach the screen of the cloating configuration.

Could it be that I need to add something in the htaccess file?

 

Regards

nicholas
Akeeba Staff
Manager

Can I please have the exact URL that gets blocked?

For what it's worth, I believe that indeed you need to change the list of allowed tmpl= keywords but what you have entered seems random and out of place. The tmpl keyword will appear in the exact URL that gets blocked and I am pretty sure it's neither acym nor com_acym. It could also be something else. So I really need that URL to tell you exactly what it is.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Joso

Hi, this is what makes up the url:  component/acym/archive/

 

the site is https://www.amus-aeronautica.it (the site is live from this morning), but actually admin tools is disabled

Thanks

nicholas
Akeeba Staff
Manager

OK, here's another way to go about it. After having that URL blocked go to Admin Tools, Web Application Firewall, Blocked Requests Log. Look for the entry with the component/acym/archive URL. Can you please tell me what the Reason listed there is?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Joso

Hi, the reason is "tmpl= in URL"

nicholas
Akeeba Staff
Manager

I downloaded AcyMailing and took a look at its code. There is a bug in administrator/components/com_acym/libraries/joomla/form.php line 30, in the acym_noTemplate() method.  The 'none' in there should probably be 'raw' because there is no such thing as tmpl=none in Joomla but there is tmpl=raw. Not by explicit code but by custom. The reason dates back to Joomla 1.0 but that's besides the point.

The difference between tmpl=component and tmpl=raw is subtle. tmpl=component doesn't render the template's page chrome but it loads its CSS (it goes through the component.php file of the template) whereas tmpl=raw does not go through the template at all.

In Joomla 3 an unknown tmpl keyword acts as though tmpl=raw was used. In Joomla 4 any unknown tmpl keyword, included "none", throws an error. Moreover, Joomla 4 removed tmpl=raw and treats it as though no tmpl parameter was passed, i.e. everything is rendered through the site's template.

The reason Admin Tools blocks unknown tmpl keywords is that if they are not handled by a system plugin they can cause Joomla to load an arbitrary PHP file from the main directory of the template. Reducing the attack surface area to the default values shipped with Admin Tools mitigates the risk. 'component' has special meanings in templates, 'system' is caught by Joomla, 'raw' is the customary absolutely-no-template value and 'koowa' is a special value used by the Nooku Framework. None of these will cause a security issue on Joomla 3.

Can you please contact AcyMailing authors and let them know? I can't find their contact information. If they need to write back to me they can email me at nicholas at our site's domain name. I will be happy to help them understand this better if they need to.

In any case, you can tell Admin Tools to ignore AcyMailing's bug. Go to Components, Admin Tools, Web Application Firewall, Configure WAF and add none at the end of the comma-separated  “List of allowed tmpl= keywords”. So, the entire thing would now read:

component,system,raw,koowa,none

I hope that helps.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Joso

Hi Nicholas, I added "none" but it not works. I tried different cloaking settings and maybe with the addition of "none" it works:

 

Block tmpl=foo system template switch --> Yes List of allowed tmpl= keywords --> component,system,raw,koowa,none,acym,com_acym,archive, Block template=foo site template switch --> Yes Allow site templates --> Yes   How the image attached.    if you want to have a look, I can pass you a super admin profile in private.  

Anyway i had already opened a ticket on the acymailing forum and i will write an update with based on what you wrote me, and i will let you know.

Regards

 

nicholas
Akeeba Staff
Manager

You did not do what I told you to do. You did something different.

Go to Components, Admin Tools, Web Application Firewall, Configure WAF and set the “List of allowed tmpl= keywords” to exactly the followin

component,system,raw,koowa,none

Do not add a trailing comma, do not add random and useless things I did not tell you to put there. If this still doesn't work for you I can make the ticket private so I can take a look at your site.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!