tomneedham / loginprotect

Protect admin login using IP ranges
https://marketplace.owncloud.com/apps/loginprotect
GNU Affero General Public License v3.0
1 stars 0 forks source link

Installing the app breaks Owncloud #4

Open va1entin opened 6 years ago

va1entin commented 6 years ago

Owncloud version: 10.0.9 Installed from the Univention App Center, running on UCS 4.3-1

Immediately after the app is installed OC only shows "Internal Server Error". OCC doesn't work either. It puts out the following

An unhandled exception has been thrown:
Error: Class 'OCA\LoginProtect\Application' not found in /var/lib/univention-appcenter/apps/owncloud/data/custom/loginprotect/appinfo/app.php:26
Stack trace:
#0 /var/www/owncloud/lib/private/legacy/app.php(242): require_once()
#1 /var/www/owncloud/lib/private/legacy/app.php(193): OC_App::requireAppFile('loginprotect')
#2 /var/www/owncloud/lib/private/legacy/app.php(127): OC_App::loadApp('loginprotect')
#3 /var/www/owncloud/lib/private/Console/Application.php(99): OC_App::loadApps()
#4 /var/www/owncloud/console.php(105): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#6 {main}
extremeshok commented 6 years ago

same here

extremeshok commented 6 years ago

Duplicate of #3

tomneedham commented 6 years ago

Hey thanks for reporting. I think this is an issue with class loading on !osx. Can you try this beta build:

loginprotect.tar.gz

timka23 commented 6 years ago

How to remove this extension? Immediately after the app is installed OC only shows "Internal Server Error".

tomneedham commented 6 years ago

@timka23 Disable the app, occ will be broken - but you can use SQL: UPDATE oc_appconfig SET configvalue='no' WHERE appid = 'loginprotect' AND configkey = 'enabled';

va1entin commented 6 years ago

@tomneedham Thanks for the beta build. I extracted it to the apps folder and enabled it using occ. Unfortunately Owncloud was broken again afterwards.

root@owncl-82346455: /var/www/owncloud # wget https://github.com/tomneedham/loginprotect/files/2400577/loginprotect.tar.gz

root@owncl-82346455: /var/www/owncloud # tar -xf loginprotect.tar.gz

root@owncl-82346455: /var/www/owncloud # mv loginprotect apps/

root@owncl-82346455: /var/www/owncloud # chown -R www-data:www-data apps/loginprotect/

root@owncl-82346455: /var/www/owncloud # sudo -u www-data ./occ app:list
Enabled:
  - comments: 0.3.0
  - configreport: 0.1.1
  - dav: 0.3.2
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_sharing: 0.10.1
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - market: 0.2.4
  - notifications: 0.3.4
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - updatenotification: 0.2.1
  - user_ldap: 0.11.0
Disabled:
  - encryption
  - external
  - loginprotect
  - onlyoffice
  - richdocuments
  - user_external

root@owncl-82346455: /var/www/owncloud # sudo -u www-data ./occ app:enable loginprotect
loginprotect enabled

root@owncl-82346455: /var/www/owncloud # sudo -u www-data ./occ app:list
An unhandled exception has been thrown:
Error: Class 'OCA\LoginProtect\Application' not found in /var/www/owncloud/apps/loginprotect/appinfo/app.php:26
Stack trace:
#0 /var/www/owncloud/lib/private/legacy/app.php(242): require_once()
#1 /var/www/owncloud/lib/private/legacy/app.php(193): OC_App::requireAppFile('loginprotect')
#2 /var/www/owncloud/lib/private/legacy/app.php(127): OC_App::loadApp('loginprotect')
#3 /var/www/owncloud/lib/private/Console/Application.php(99): OC_App::loadApps()
#4 /var/www/owncloud/console.php(105): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#6 {main}
VietTralala commented 6 years ago

@timka23 Disable the app, occ will be broken - but you can use SQL: UPDATE oc_appconfig SET configvalue='no' WHERE appid = 'loginprotect' AND configkey = 'enabled';

how and where do you execute this command?

tomneedham commented 6 years ago

In the database server