Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to access array offset on value of type bool at /var/www/nextcloud/apps/user_external/lib/base.php#69 #167

Open
santifa opened this issue Jan 21, 2021 · 1 comment
Labels
0. Needs triage bug Something isn't working

Comments

@santifa
Copy link

santifa commented Jan 21, 2021

Hey folks,

I attached my nextcloud instance to a samba adc via the user_external and have frequent errors from the plugins.
The message states Trying to access array offset on value of type bool at /var/www/nextcloud/apps/user_external/lib/base.php#69. The problem might lead to unexpected behavior since then groups are not populated correctly and
the nextcloud itself behaves slowly with login and showing users.

Steps to reproduce

  1. Install Nextcloud and some Samba ADC with integrated LDAP
  2. Install and Configure user_external
  3. See the error messages happening

Expected behaviour

The error doesn't happen and the group propagation work as expected.
So if you assign a person to a group as administrator, the person sees it's group in the settings
and the restrictions are applied as stated in the settings, e.g. you the external storages for that group.

Actual behaviour

This error happens frequently.
Also groups assigned to people are not visible to the people itself and e.g. external storage
for that group is visible to its members.

Affected Authentication backend

SMB Backend

Server configuration

User External App version: v1.0.0

Operating system: Debian10

Web server: Nginx

Database: MariaDB

PHP version: php7.4

Nextcloud version: 20.0.5

Updated from an older Nextcloud/ownCloud or fresh install: fresh install

Where did you install Nextcloud from: Manually

Signing status: unsigned

Signing status
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.

No errors have been found.

List of activated apps:

App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Enabled:

  • accessibility: 1.6.0
  • activity: 2.13.4
  • admin_audit: 1.10.0
  • apporder: 0.11.0
  • breezedark: 20.0.3
  • calendar: 2.1.3
  • cloud_federation_api: 1.3.0
  • comments: 1.10.0
  • contacts: 3.4.3
  • contactsinteraction: 1.1.0
  • dav: 1.16.2
  • deck: 1.2.3
  • drawio: 0.9.8
  • external: 3.7.1
  • extract: 1.3.0
  • federatedfilesharing: 1.10.2
  • federation: 1.10.1
  • files: 1.15.0
  • files_external: 1.11.1
  • files_markdown: 2.3.1
  • files_pdfviewer: 2.0.1
  • files_rightclick: 0.17.0
  • files_sharing: 1.12.2
  • files_trashbin: 1.10.1
  • files_versions: 1.13.0
  • files_videoplayer: 1.9.0
  • groupfolders: 8.2.0
  • logreader: 2.5.0
  • lookup_server_connector: 1.8.0
  • nextcloud_announcements: 1.9.0
  • notifications: 2.8.0
  • oauth2: 1.8.0
  • password_policy: 1.10.1
  • passwords: 2021.1.2
  • photos: 1.2.3
  • privacy: 1.4.0
  • provisioning_api: 1.10.0
  • rainloop: 7.0.3
  • recommendations: 0.8.0
  • richdocuments: 3.7.11
  • serverinfo: 1.10.0
  • settings: 1.2.0
  • sharebymail: 1.10.0
  • support: 1.3.0
  • systemtags: 1.10.0
  • tasks: 0.13.6
  • text: 3.1.0
  • theming: 1.11.0
  • twofactor_backupcodes: 1.9.0
  • updatenotification: 1.10.0
  • user_external: 1.0.0
  • viewer: 1.4.0
  • workflowengine: 2.2.0
    Disabled:
  • dashboard
  • encryption
  • firstrunwizard
  • ldap_write_support
  • mail
  • survey_client
  • user_ldap
  • user_status
  • weather_status

Nextcloud configuration:

Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or

Insert your config.php content here.
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

{
"system": {
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"192.168.78.10",
"test.cobios.de",
"0.0.0.0",
"cloud.cobios.de"
],
"trusted_proxies": "REMOVED SENSITIVE VALUE",
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "mysql",
"version": "20.0.5.2",
"overwrite.cli.url": "https://localhost",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"instanceid": "REMOVED SENSITIVE VALUE",
"activity_expire_days": 14,
"auth.bruteforce.protection.enabled": true,
"blacklisted_files": [
".htaccess",
"Thumbs.db",
"thumbs.db",
".DS_Store"
],
"cron_log": true,
"enable_previews": true,
"enabledPreviewProviders": [
"OC\Preview\PNG",
"OC\Preview\JPEG",
"OC\Preview\GIF",
"OC\Preview\BMP",
"OC\Preview\XBitmap",
"OC\Preview\Movie",
"OC\Preview\PDF",
"OC\Preview\MP3",
"OC\Preview\TXT",
"OC\Preview\MarkDown"
],
"filesystem_check_changes": 0,
"filelocking.enabled": "true",
"htaccess.RewriteBase": "/",
"integrity.check.disabled": false,
"knowledgebaseenabled": false,
"logfile": "/var/nc_data/nextcloud.log",
"loglevel": 0,
"logtimezone": "Europe/Berlin",
"log_rotate_size": 104857600,
"maintenance": false,
"memcache.local": "\OC\Memcache\APCu",
"memcache.locking": "\OC\Memcache\Redis",
"overwriteprotocol": "https",
"overwritehost": "cloud.cobios.de",
"overwritewebroot": "/",
"overwriteconaddr": "^192.168.78.6$",
"preview_max_x": 1024,
"preview_max_y": 768,
"preview_max_scale_factor": 1,
"redis": {
"host": "REMOVED SENSITIVE VALUE",
"port": 0,
"timeout": 0
},
"quota_include_external_storage": false,
"share_folder": "/Shares",
"skeletondirectory": "",
"theme": "",
"trashbin_retention_obligation": "auto, 7",
"updater.release.channel": "stable",
"user_backends": [
{
"class": "OC_User_SMB",
"arguments": [
"192.168.78.3"
]
}
],
"mail_smtpmode": "smtp",
"mail_smtpsecure": "tls",
"mail_sendmailmode": "smtp",
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "25",
"mail_smtpname": "REMOVED SENSITIVE VALUE",
"mail_smtppassword": "REMOVED SENSITIVE VALUE",
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "OCA\User_LDAP\LDAPProviderFactory"
}
}

Logs

Web server error log

Web server error log
Insert your webserver log here

Nothing special here.

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Too much deprecated class informations and the error described above.

{"reqId":"IfHPJvESYKpMUNArQY3K","level":3,"time":"2021-01-21T15:12:10+01:00","remoteAddr":"192.168.82.32","user":"xxx","app":"PHP","method":"GET","url":"/ocs/v2.php/apps/notifications/a
pi/v2/notifications","message":{"Exception":"Error","Message":"Trying to access array offset on value of type bool at /var/www/nextcloud/apps/user_external/lib/base.php#69","Code":0,"Trace":[
{"file":"/var/www/nextcloud/apps/user_external/lib/base.php","line":69,"function":"onError","class":"OC\Log\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/User/User.php"
,"line":133,"function":"getDisplayName","class":"OCA\user_external\Base","type":"->"},{"file":"/var/www/nextcloud/apps/external/lib/SitesManager.php","line":135,"function":"getDisplayName",
"class":"OC\User\User","type":"->"},{"file":"/var/www/nextcloud/apps/external/lib/AppInfo/Application.php","line":44,"function":"getSitesToDisplay","class":"OCA\External\SitesManager","ty
pe":"->"},{"file":"/var/www/nextcloud/apps/external/appinfo/app.php","line":24,"function":"register","class":"OCA\External\AppInfo\Application","type":"->"},{"file":"/var/www/nextcloud/lib
/private/legacy/OC_App.php","line":289,"args":["/var/www/nextcloud/apps/external/appinfo/app.php"],"function":"require_once"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line"
:171,"function":"requireAppFile","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":131,"function":"loadApp","class":"OC_App","type":"::"},{"file"
:"/var/www/nextcloud/ocs/v1.php","line":56,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/ocs/v2.php","line":24,"args":["/var/www/nextcloud/ocs/v1.php"],"func
tion":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefo
x/84.0","version":"20.0.5.2"}

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@violoncelloCH
Copy link
Member

I'm not sure why that error would happen, as it'd mean that something in the Database would be wrong, and as far as I can see not with user-external...
Also there is probably some confusion going on. You are speaking about group assignment: user-external isn't capable of doing that, it just checks user/password combination against a different service (samba in your case)... however, if you have an active directory you probably want Nextcloud to authenticate against that one directly using LDAP. That's core functionality of Nextcloud and I'd suggest you to take a look at it, as through that it's possible to populate group assignments and do all kind of advanced things...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants