seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.44k stars 229 forks source link

COPS Basic authentication no longer works? #342

Closed marioscube closed 7 years ago

marioscube commented 7 years ago

Can someone confirm that COPS Basic authentication (see Wiki) no longet works with:

$config['cops_basic_authentication'] = array(); in confil_local.php and $config['cops_basic_authentication'] = array('username' => 'user', 'password' => 'xxxxx'); in config_local.user.php

I tried on a new install of COPS (version 1.1.0) with Debian Jessie.

CHBMB commented 7 years ago

Yep, I've had a report from someone using the docker container that this no longer works.

marioscube commented 7 years ago

As a workaround:

Change a line in config.php from

require_once dirname(FILE) . '/' . $user_config_file; to require dirname(FILE) . '/' . $user_config_file;

I do not know if this is even a "good solution to this problem", but it fixed my problem!

All credits to @chadberg for finding out what went wrong in cops.

CHBMB commented 7 years ago

@marioscube Any reason why we shouldn't do a PR for this?

More than happy to do it, just wondered if there was a reason I didn't know about why it hasn't already been done.

Thanks @chadberg for figuring this out from me too...

marioscube commented 7 years ago

No reason at all. @seblucas asked for it in #344 .

Go for it! Just credit @chadberg ;-)

chadberg commented 7 years ago

Glad to see it resolved. Thanks for making a pull request, I would have gotten to it this afternoon with confirmation from others, but you beat me to it! :smile_cat:

CHBMB commented 7 years ago

@chadberg I'm just very grateful you figured it out man!

seblucas commented 7 years ago

Fixed in #345