northox / roundcube-yubikey-plugin

A plugin to use Yubico's Yubikey 2nd factor with Roundcube webmail
GNU General Public License v2.0
31 stars 6 forks source link

PHP Error: Failed to load plugin file after upgrading to Roundcube 1.3.1 #19

Closed mathias-ch1903 closed 6 years ago

mathias-ch1903 commented 6 years ago

After updating to roundcube 1.3.1: Failed to load plugin file $$BASEPATH$$$/plugins/roundcube_yubikey_plugin/roundcube_yubikey_plugin.php PHP Error: Failed to load plugin file $$BASEPATH$$$/plugins/roundcube_yubikey_plugin/roundcube_yubikey_plugin.php in$$BASEPATH$$$/program/lib/Roundcube/rcube_plugin_api.php on line 173 (POST /xyz/?_task=login&_action=login)

Had to rename "yubikey_authentication.php" to "roundcube_yubikey_plugin.php" and rename the class definition from: class yubikey_authentication extends rcube_plugin to class roundcube_yubikey_plugin extends rcube_plugin

further modified yubikey.js: <label for="rcmloginyubikey">' + rcmail.get_label('yubikey_authentication.yubikey') + '</label> \ to <label for="rcmloginyubikey">' + rcmail.get_label('roundcube_yubikey_plugin') + '</label> \

the rest seems to work fine with 1.3.1 :-)

thanks for the great work!

northox commented 6 years ago

Thanks! Care to submit a pull request or you prefer I do it myself?

mathias-ch1903 commented 6 years ago

Hi Danny

Am 2017-10-28 00:06, schrieb Danny Fullerton:

Thanks! Care to submit a pull request or you prefer I do it myself? I'm not that advanced in using GitHub and I dont want to do a mess ;-) It would be great if you could do the necessary changes.

kind regards

mercurytoxic commented 6 years ago

This commit breaks the plugin for me.

[03-Apr-2018 12:02:51 +1000]: PHP Error: Failed to load plugin file /usr/share/webapps/roundcubemail/plugins/yubikey_authentication/yubikey_authentication.php in /usr/share/webapps/roundcubemail/program/lib/Roundcube/rcube_plugin_api.php on line 173 (POST /?_task=mail&_action=refresh)

As per installation instructions in the README.md it expects a yubikey_authentication.php in a plugins/yubikey_authentication folder.

The problem here maybe is the lack of uniformity between the instructions and the name of the repository. Instructions tell you to install in plugins/yubikey_authentication/ but if you clone from github it installs in plugins/roundcube-yubikey-plugin.

I suspect @mathias-ch1903 has $config['plugins'] = array('roundcube_yubikey_authentication'); in his config.ini.php which is not compliant with README.md

$git revert d35ae6740a4e1e9440266c71d34252fa60093854 fixes issues from this commit for me,

northox commented 6 years ago

Understood. Thanks. I'll update the readme file.