Skip to content

Commit db9d584

Browse files
committedFeb 25, 2019
Fix issue with wrong store being used for key verification
1 parent c603f4b commit db9d584

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed
 

‎code/controllers/ApiController.php

+1-7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Clerk_Clerk_ApiController extends Mage_Core_Controller_Front_Action
1010
*/
1111
public function preDispatch()
1212
{
13+
$this->setStore();
1314
$this->getResponse()->setHeader('Content-type', 'application/json');
1415

1516
$input = $this->getRequest()->getHeader('CLERK-PRIVATE-KEY');
@@ -53,7 +54,6 @@ public function versionAction()
5354
*/
5455
public function storeAction()
5556
{
56-
$this->setStore();
5757
$data = [];
5858

5959
foreach (Mage::helper('clerk')->getAllStores() as $store) {
@@ -74,8 +74,6 @@ public function storeAction()
7474
*/
7575
public function productAction()
7676
{
77-
$this->setStore();
78-
7977
// Handler for product endpoint. E.g.
8078
// http://store.com/clerk/api/product/id/24
8179
$id = $this->getRequest()->getParam('id', false);
@@ -112,8 +110,6 @@ public function productAction()
112110
*/
113111
public function categoryAction()
114112
{
115-
$this->setStore();
116-
117113
$page = $this->getIntParam('page');
118114
$limit = $this->getIntParam('limit');
119115

@@ -160,8 +156,6 @@ public function categoryAction()
160156
*/
161157
public function orderAction()
162158
{
163-
$this->setStore();
164-
165159
$page = $this->getIntParam('page');
166160
$limit = $this->getIntParam('limit');
167161
$days = $this->getIntParam('days');

‎code/etc/config.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<config>
33
<modules>
44
<Clerk_Clerk>
5-
<version>3.5.5</version>
5+
<version>3.5.6</version>
66
</Clerk_Clerk>
77
</modules>
88
<global>

0 commit comments

Comments
 (0)
Please sign in to comment.