Missing config keys

Discuss bugs related to Logic Invoice.
Post Reply
andyg2
Posts: 10
Joined: Tue Jul 26, 2016 7:08 pm

Missing config keys

Post by andyg2 » Fri Jul 29, 2016 10:12 pm

Hi,
I may have found a bug. After adding a SSL certificate to my installation of Logic Invoice and setting the `Use SSL` in the server settings. Everything was working as expected except for the user login and the admin login. These login forms had their action set to the non-ssl version of the site so I went digging to find out why.

It turns out that there were configuration values not present in the database.

Line: 57 of uploads/index.php and line: 47 of upload/admin/cron.php `config_use_ssl` was referenced

Code: Select all

$url = new Url($config->get('config_url'), $config->get('config_use_ssl') ? $config->get('config_ssl') : $config->get('config_url'));
Line: 54 of uploads/admin/index.php `config_secure` was referenced

Code: Select all

$url = new Url(HTTP_SERVER, $config->get('config_secure') ? HTTPS_SERVER : HTTP_SERVER);
Rather than change the source code to use the entry `config_ssl` which is connected to the admin settings page I opted to add the missing entries into the database and the forms now submit the credentials over the SSL URL.
I suspect the correct fix would be to change the source code to use `config_ssl` but as I will always use SSL and whichever config key is chosen in the future nothing will break for me.

Code: Select all

INSERT INTO `your_database`.`feihb_setting` (
    `group`,
    `key`,
    `value`,
    `serialized`
)
VALUES (
    'config', 'config_use_ssl', '1', '0'
), (
    'config', 'config_secure', '1', '0'
);

User avatar
Esmond
Site Admin
Posts: 284
Joined: Tue Sep 15, 2015 3:08 pm
Location: Singapore
Contact:

Re: Missing config keys

Post by Esmond » Sat Jul 30, 2016 11:59 am


Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests