Post by owbewest » Tue Jun 21, 2016 9:44 pm

Hi Everyone!

Greetings from Morocco.
I have a little issue here. I installed this extension called "Simple Login Security" and got my self locked out.
When I enter my login / pass I get redirected to the homepage instead of backoffice.

The .xml that I installed is along with some config.php changes are as following:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
   <name>BD Simple Security</name>
   <version>1.0</version>
   <author>Šarūnas Lazauskas</author>
   <link>http://e-business.lt</link>
   <code>bd-simple-security</code>
    <file path="admin/controller/common/login.php">
        <operation>
         <search><![CDATA[$this->load->language('common/login');]]></search>
         <add position="after"><![CDATA[
            $pass = null;
            if (!isset($_GET[PASS_KEY]) || $_GET[PASS_KEY] != PASS)
            {
                $this->response->redirect('http://'.$_SERVER['HTTP_HOST']."/");
            }
            else
            {
                $pass = '&'.PASS_KEY.'='.PASS;
            }
            ]]></add>
      </operation>
        <operation>
         <search><![CDATA[$data['action'] = $this->url->link('common/login', '', 'SSL');]]></search>
         <add position="replace"><![CDATA[
            $data['action'] = $this->url->link('common/login', '', 'SSL').$pass;
            ]]></add>
      </operation>
    </file>
</modification>

Config edits:

Code: Select all

<?php'
   define('PASS_KEY', 'passkey');
   define('PASS', 'YourPassword');

After doing some research there was this guy that mentioned to the developper that he had an error in his .xml and had to modify it. The modification he mentioned was:
Your extension is great but it is no compatible with OC 2.2. Please fix that problem!
You can check yourself oc 2.2 has different login.php and there isn't 'SSL' anymore!!!

Code: Select all

$this->url->link('common/login', '', 'SSL');
should be for OC2.2
$this->url->link('common/login', '', true);
and
$data['action'] = $this->url->link('common/login', '', 'SSL').$pass;
should be for OC2.2
$data['action'] = $this->url->link('common/login', '', true).$pass;

Since I already installed it and got myself in trouble now. I don't know which files to change that SSL to true :-[

Can anyone help me out please and tell me which file and its path.

Thank you!!

Newbie

Posts

Joined
Tue Jun 21, 2016 8:37 pm
Location - Morocco

Post by AlexDW » Wed Jun 22, 2016 2:16 am

Why you don't use file for opencart 2.2.0.0 from this extension? ???
http://www.opencart.com/index.php?route ... n_id=21371

(upload OpenCart 2.x\bd_simple_security_OC2.2.ocmod.xml)

Useful Opencart extensions


User avatar
New member

Posts

Joined
Sun Jun 05, 2016 3:32 am

Post by owbewest » Wed Jun 22, 2016 2:21 am

That is what I did. It is that same exact Extension :-\

Newbie

Posts

Joined
Tue Jun 21, 2016 8:37 pm
Location - Morocco
Who is online

Users browsing this forum: No registered users and 1 guest