{"id":33,"date":"2015-07-10T11:29:00","date_gmt":"2015-07-10T11:29:00","guid":{"rendered":"https:\/\/www.tech-and-dev.com\/blog\/2015\/07\/10\/fix-magento-access-denied-after-patch-supee-6285\/"},"modified":"2021-02-22T01:04:13","modified_gmt":"2021-02-22T01:04:13","slug":"fix-magento-access-denied-after-patch-supee-6285","status":"publish","type":"post","link":"https:\/\/www.tech-and-dev.com\/blog\/2015\/07\/fix-magento-access-denied-after-patch-supee-6285.html","title":{"rendered":"Fix Magento Access Denied After Patch SUPEE-6285"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/magento-logo.png\"><img decoding=\"async\" title=\"Magento\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/magento-logo.png\" alt=\"magento logo\" border=\"0\" \/><\/a><\/div>\n<p>&nbsp;<\/p>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\">Magento has released a critical patch (SUPEE-6285) that fixes many XSS and CSRF vulnerabilities (<a href=\"http:\/\/merch.docs.magento.com\/ce\/user_guide\/Magento_Community_Edition_User_Guide.html#magento\/patch-releases-2015.html\" target=\"_blank\" rel=\"nofollow noopener\">Official Release<\/a>).<\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\">However, it seems many 3rd party extensions were affected by this due to bad implementation, and are returning &#8220;Access Denied&#8221; to all the admin roles except the Administrator.<\/div>\n<p><a name=\"more\"><\/a><\/p>\n<div style=\"text-align: justify;\">If you can&#8217;t wait for an official patch for these extensions or have some custom made extensions, you can fix this easily.<\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\">Every class or controller that inherit <span style=\"color: orange;\"><b>Mage_Adminhtml_Controller_Action<\/b><\/span> must override the <b><span style=\"color: orange;\">_isAllowed()<\/span><\/b> method.<\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\">For example, if your controller don&#8217;t use ACL, you can override the method as follows:<\/div>\n<pre>protected function _isAllowed()\r\n{\r\n\u00a0\u00a0\u00a0 return true;\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<div style=\"text-align: justify;\">Or if the controller is using ACL, you will have to find the ACL name and override the method using the ACL path:<\/div>\n<pre>protected function _isAllowed()\r\n{\r\n\u00a0\u00a0\u00a0 return Mage::getSingleton('admin\/session')-&gt;isAllowed('catalog\/report_module');\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<div style=\"text-align: justify;\">The ACL path can be found in the extenion&#8217;s directory: etc\/adminhtml.xml<\/div>\n<div style=\"text-align: justify;\">For example, the below example has catalog\/report_module as ACL path:<\/div>\n<pre>&lt;acl&gt;\r\n\u00a0\u00a0\u00a0 &lt;resources&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;admin&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;children&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;catalog&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;children&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;report_module translate=\"title\" module=\"report_module\"&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;title&gt;Manage Reports&lt;\/title&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;sort_order&gt;15&lt;\/sort_order&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/report_module&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/children&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/catalog&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;report&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;children&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;report_module translate=\"title\" module=\"report_module\"&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;title&gt;Reports&lt;\/title&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;sort_order&gt;15&lt;\/sort_order&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;children&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;first_page module=\"report_module\"&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0 &lt;title&gt;Report1&lt;\/title&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0 &lt;sort_order&gt;2&lt;\/sort_order&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/first_page&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;second_page module=\"report_module\"&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0 &lt;title&gt;Report2&lt;\/title&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0 &lt;sort_order&gt;3&lt;\/sort_order&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/second_page&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/children&gt;\u00a0\u00a0\u00a0 \r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/report_module&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/children&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/report&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;system&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;children&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;report_module translate=\"title\" module=\"report_module\"&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;title&gt;Manage Reports&lt;\/title&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;sort_order&gt;15&lt;\/sort_order&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/report_module&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/children&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/system&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/children&gt;\r\n\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &lt;\/admin&gt;\r\n\u00a0\u00a0\u00a0 &lt;\/resources&gt;\r\n&lt;\/acl&gt;<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Magento has released a critical patch (SUPEE-6285) that fixes many XSS and CSRF vulnerabilities (Official Release). However, it seems many 3rd party extensions were affected by this due to bad implementation, and are returning &#8220;Access Denied&#8221; to all the admin roles except the Administrator. If you can&#8217;t wait for an official patch for these [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[44,22,28],"tags":[],"class_list":["post-33","post","type-post","status-publish","format-standard","hentry","category-magento","category-php","category-security"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/comments?post=33"}],"version-history":[{"count":2,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/33\/revisions"}],"predecessor-version":[{"id":323,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/33\/revisions\/323"}],"wp:attachment":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/media?parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/categories?post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/tags?post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}