CADViewer / NextCloud

CAD viewing, markup and collaboration on NextCloud for AutoCAD, MicroStation and advanced raster graphics.
GNU Affero General Public License v3.0
23 stars 3 forks source link

[Bug]: Autoload path not allowed: /var/www/html/custom_apps/cadviewer/appinfo/application.php #62

Closed chunzhenzyd closed 1 year ago

chunzhenzyd commented 1 year ago

Bug description

I wanted to enable cadviewer, but got an error: Autoload path not allowed: /var/www/html/custom_apps/cadviewer/appinfo/application.php

Steps to reproduce

1.enable cadviewer 2. 3.

Expected behavior

cadviewer enabled

Installation method

Official Docker image

Operating system

Debian/Ubuntu 22.04

PHP engine version

PHP 8.2.7

Web server

Apache (supported)

Database engine version

MySQL

Nextcloud Logs

{"reqId":"KStj4MPK3MqDF1i2kvb0","level":3,"time":"2023-07-02T14:53:07+00:00","remoteAddr":"192.168.10.19","user":"root","app":"settings","method":"POST","url":"/settings/apps/enable","message":"could not enable apps","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"27.0.0.8","exception":{"Exception":"OCP\\AutoloadNotAllowedException","Message":"Autoload path not allowed: /var/www/html/custom_apps/cadviewer/appinfo/application.php","Code":0,"Trace":[{"file":"/var/www/html/lib/autoloader.php","line":166,"function":"isValidPath","class":"OC\\Autoloader","type":"->","args":["/var/www/html/custom_apps/cadviewer/appinfo/application.php"]},{"function":"load","class":"OC\\Autoloader","type":"->","args":["OCA\\Cadviewer\\AppInfo\\Application"]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":217,"function":"class_exists","args":["OCA\\Cadviewer\\AppInfo\\Application"]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":400,"function":"isBootable","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":["cadviewer"]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":137,"function":"loadApp","class":"OC\\App\\AppManager","type":"->","args":["cadviewer"]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":890,"function":"loadApp","class":"OC_App","type":"::","args":["cadviewer"]},{"file":"/var/www/html/lib/private/Installer.php","line":164,"function":"executeRepairSteps","class":"OC_App","type":"::","args":["cadviewer",["OCA\\Cadviewer\\Migration\\RegisterMimeType"]]},{"file":"/var/www/html/apps/settings/lib/Controller/AppSettingsController.php","line":451,"function":"installApp","class":"OC\\Installer","type":"->","args":["cadviewer"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":[["cadviewer"],[]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\AppSettingsController"],"enableApps"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\AppSettingsController"],"enableApps"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","enableApps",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["settings.AppSettings.enableApps"]]},{"file":"/var/www/html/lib/base.php","line":1064,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/enable"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/autoloader.php","Line":141,"message":"could not enable apps","exception":{},"CustomMessage":"could not enable apps"}}

Additional info

root@hlfd/nextcloud:/var/www/html# ls -lrt /var/www/html/custom_apps/cadviewer/appinfo/application.php -rw-r--r-- 1 www-data www-data 3963 Jul 2 14:51 /var/www/html/custom_apps/cadviewer/appinfo/application.php

CADViewer commented 1 year ago

Hello @chunzhenzyd , we have released CADViewer version v8.77.1 both on GitHub and in the NextCloud store, it is tested against NextCloud version 27, where the application.php Autoload issue was introduced.

CADViewer commented 1 year ago

User's reports v8.77.1 is working with Nextcloud 27