Support

Admin Tools

#27533 Admin Tools is blocking updatecart

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, 01 June 2017 17:17 CDT

lt635
 Hello,

I have just noticed on a couple of sites that Admin Tools is blocking the delete option in Hikashop cart module. If I keep trying to delete I get blocked.

Checking it in Chrome it shows an error 403 - forbidden.

The reason recorded in Admin Tools is 'tmpl= in URL' and the from the log:
http://www.irlendyslexia.com/store/product/updatecart/cart_id-668/cart_product_id-2407/quantity-0/return_url-aHR0cDovL3d3dy5pcmxlbmR5c2xleGlhLmNvbS9pbmRleC5waHAvc3RvcmUvcHJvZHVjdC83LWNvbG91cmVkLXBhcGVyLWhhbmR3cml0aW5nLWV4ZXJjaXNlLWJvb2tzLTQ0LXBhZ2U=?tmpl=


I hope you can help.

Thank you
Kind regards
Lene

nicholas
Akeeba Staff
Manager
I'm not at all certain that Admin Tools is blocking you. The 403 Forbidden HTTP status comes from Apache, not Admin Tools. It's far more likely that you have either a .htaccess directive or a web server-level firewall setting blocking this request. My educated guess is that since this URL contains base64 encoded data as part of the path there's a rule placed in the web server's mod_security2 firewall (note: this is something installed on the web server, NOT Joomla!) by your host. If I'm not mistaken that's a rule from the OWASP ModSecurity Core Rule Set Project regarding a very old base64 attack vector in WordPress which should be easy for your host to disable on your site.

That said, let's make sure that the problem is indeed not caused by Admin Tools. In order to do so, let's try the following:

1. Try setting the Error Reporting level in your Global Configuration to "None". Many errors are caused by harmless PHP Notices and Warnings being output to the browser, breaking anything which requires HTTP header manipulation such as Joomla!'s session management, AJAX calls and download systems.

2. Try to replicate the issue after disabling the "System - Admin Tools" plugin. If you can still replicate the issue, it is not caused by Admin Tools. Disabling that plugin means that Admin Tools code (including the Web Application Firewall) is not running on your site.

3. If you suspect an issue with the .htaccess file, replace its contents with the contents of the stock htaccess.txt file shipped with every version of Joomla!. If you are on GoDaddy please wait for 1-30 minutes for the changes to be effective. Then, retry loading the problem page. If you can still reproduce the error, then it is not caused by .htaccess Maker.

If doing any of the above resulted in the issue still occurring, it's not related with Admin Tools and we can't help you. If doing any of the above did stop the issue from occurring, we'll have to do some troubleshooting.

First go to Admin Tools, Web Application Firewall, Configure WAF. Make sure "Log security exceptions" is set to Yes; if it's not, set it to Yes and click on Save. Now try reproducing your issue. Immediately after that, please go to Admin Tools, Web Application Firewall, Security Exceptions Log. The latest log entry at the top should have the date and time of when the issue occurred. Please copy the Reason and Target URL here so that we can further help you.

If, however, you do not see a log entry, or the Date and/or IP address do not match your last access, this problem is not caused by Admin Tools' WAF. In this case, you will have to do some .htaccess troubleshooting. You may need to read the general .htaccess troubleshooting page, as well as the page on finding out necessary .htaccess exceptions. If that still doesn't help please read my comment at the top of this reply about my educated guess on where the problem lies and please forward our entire conversation to your host so they can help you.

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!

lt635

Hello,

Thank you for getting back to me so quickly.

1. I tried setting the errors to none, no change
2. I did try to deactivate the plugin before contacting you. I renamed the main.php file and tried deleting form the cart module and it work. Put it back in place and it is no longer working.
3. I deactivated the .htaccess file to test, just in case, and the problem was still there.

I just checked another website that I have not updated to the latest version of Hikashop and the delete button in the module is working. From that I would think there is a conflict with their latest release? As the problem is fixed when I deactivate the plugin do I talk to you or Hikashop?

This website is running Hikashop 2.6.4 the other two with the problem is running version 3.0.1.
https://afom.org.au/shop-auctions/shop

Thank you
Kind regards
Lene

nicholas
Akeeba Staff
Manager
I'm sorry, but I have to repeat myself since you only follow half of the instructions.

First go to Admin Tools, Web Application Firewall, Configure WAF. Make sure "Log security exceptions" is set to Yes; if it's not, set it to Yes and click on Save. Now try reproducing your issue. Immediately after that, please go to Admin Tools, Web Application Firewall, Security Exceptions Log. The latest log entry at the top should have the date and time of when the issue occurred. Please copy the Reason and Target URL here so that we can further help you.

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!

lt635
Sorry, I already have the 'log security exceptions' in place, the reason and target url was in my first post, I did not think you needed it again.

I just triggered another security exception. I keep deleting them or it will block me.

tmpl= in URL

http://www.irlendyslexia.com/store/product/updatecart/cart_id-668/cart_product_id-2409/quantity-0/return_url-aHR0cDovL3d3dy5pcmxlbmR5c2xleGlhLmNvbS9pbmRleC5waHAvc3RvcmUvcHJvZHVjdC8xMy1jYW4taS1oZWxwLW15LWNoaWxkLWxlYXJuLWEtcGFyZW50LWd1aWRlLXdyaXR0ZW4taW4tcG

nicholas
Akeeba Staff
Manager
OK, I see. There's a tmpl= in your URL but it's empty. That's an invalid URL to begin with. The proper way to deal with it is contact HikaShop and ask them to investigate why an empty tmpl is being used and suppress it from the URLs they are generating. In other words, it seems to be a bug in Hikashop which went undetected because Joomla! is currently (and erroneously) ignoring an empty tmpl query string parameter.

Meanwhile, you want your site to work. You can go to Admin Tools, Web Application Firewall, Configure WAF and disable the "Block tmpl=foo system template switch" option under "Visual Fingerprinting Protection".

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!

lt635
Hello,

Ok, thank you. I will contact Hikashop regarding the issue.

Kind regards
Lene

nicholas
Akeeba Staff
Manager
I'll leave the ticket open for another 15 days. When you hear back from Hikashop please let us know. Thank you!

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!

lt635
I have reported the bug, I will let you know how it goes. Thanks.

lt635
Hello,

I am not a programmer so this it totally out of my area of expertise. This is Hikashop's reply:

I would be happy to know where there is an empty "tmpl" parameter ; I perform a search in the all HIkaShop code and I can't find any.

For the new checkout system, we are using "tmpl=ajax" which not a "regular" value but which allow us to be sure that the calls are made for the ajax system.



So can you point us where that link is exactly ?



I just want to make sure that my websites are as secure as can be without causing issues for customers. Admin Tools is one of the best subscriptions that I have as it is keeping hackers out of the websites, I have been subscribing for some years now.

Thank you
Kind regards
Lene

dlb
Lene,

Nicholas will be out of town for a few days. I'm with you, this is way over my head. I think what the HikaShop guys need to know is the steps that you went through to produce the error. It may also be helpful for them to have the output from the Admin Tools Security Log. If they can reproduce the problem on their system, they can fix it.

If we need to get a programmer involved from this end, Davide will be here the rest of the week.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

lt635
Hi Dale,

Thank you for your reply. I have suggested that Hikashop have a look at this ticket with Nicholas's comments, I think that is best as there is no point in me trying to explain the problem :).

I will let you know how it goes.

Kind regards
Lene

nicholas
Akeeba Staff
Manager
Is it possible that you are using a SEF component which gets confused and ends up with the empty tmpl? Or is it possible that you simply forgot to copy that bit? :) I suspect it's the latter. In this case go to Admin Tools, Web Application Firewall, Configure WAF and click on the Visual Fingerprinting Protection tab. Find the "List of allowed tmpl= keywords" setting. It currently reads something like
component,system,raw,koowa

Append ,ajax to it so it now reads
component,system,raw,koowa,ajax

If that works please tell Hikashop that the tmpl they should be using is called "raw". Use of non-standard tmpl keywords is discouraged not because of Admin Tools, but because system and content plugins tend to mistakenly look at tmpl instead of format to decide if the output is HTML or not. I'll see Nicolas tomorrow in JoomlaDay Norway so if they have questions you can tell him to ask me in person :)

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!

lt635
Hello Nicholas,

Sorry for taking time to reply, I have had some other issues with my site (different post) that I am still trying to figure out....

I added 'koowa,ajax' to the list of allowed tmpl, 'Block tmpl=foo system template switch' set to yes and it worked.

This is the post in Hikashop with their replies, I have not reported the last comment yet...
https://www.hikashop.com/forum/3-bug-report/889866-delete-on-cart-module-not-working.html#267846

Thank you
Kind regards
Lene

nicholas
Akeeba Staff
Manager
Their suggestion is wrong. Disabling the tmpl= check in Admin Tools opens your site to potential security issues. The simplest workaround is what I mentioned, i.e. add ajax to the list of allowed tmpl keywords. The correct fix is Hikashop using tmpl=raw, not tmpl=ajax. But that requires them actually knowing how Joomla! works which, based on their replies, I am not sure they do to the extent I do. Then again I am one of a handful of people who know Joomla's codebase inside out. If only they'd listen to me. I tried talking to Nicolas but he wouldn't see the problem he's causing by not using Joomla as it's intended to be used. I can't do anything else about it. You are their client, though, you can put pressure on them.

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!