Core: Update from 10.0.3 - User login not working - Call to a member function getUID() on null

Created on 1 Feb 2018  路  6Comments  路  Source: owncloud/core

Steps to reproduce

  1. migrate 10.0.3 -> 10.0.4
  2. migrate 10.0.3 -> 10.0.5
  3. migrate 10.0.3 -> 10.0.6

Expected behaviour

User login ok

Actual behaviour

Blank page on login on Firefox or error 500 to Chrome

Server configuration

Operating system: centos 7

Web server: nginx 1.12

Database: mariadb 5.5.56

PHP version: 5.6 ( fpm )

ownCloud version: 10.0.6

Updated from an older ownCloud or fresh install: Updated

Where did you install ownCloud from: 10.0.3

Signing status (ownCloud 9.0 and above):

No errors have been found.

The content of config/config.php:

{
    "system": {
        "allow_user_to_change_display_name": false,
        "dbtype": "mysql",
        "dbname": "owncloud",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "instanceid": "oc5766a60c0c",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/usr\/local\/CLOUD-DATA",
        "version": "10.0.6.1",
        "installed": true,
        "knowledgebaseenabled": true,
        "knowledgebaseurl": "***REMOVED SENSITIVE VALUE***",
        "ldapIgnoreNamingRules": false,
        "logfile": "\/var\/log\/owncloud\/owncloud.log",
        "loglevel": "3",
        "log_authfailip": true,
        "forcessl": true,
        "logtimezone": "Europe\/Paris",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "redis": {
            "host": "localhost",
            "port": 6379
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "theme": "",
        "trashbin_retention_obligation": "30, auto",
        "trusted_domains": [
            "cloudtest.domaine.fr"
        ],
        "secret": "***REMOVED SENSITIVE VALUE***",
        "share_folder": "\/Shared",
        "skeletondirectory": "\/local\/skeleton"
    }
}

List of activated apps:

Enabled:
  - activity: 2.3.6
  - 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_texteditor: 2.2.1
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - market: 0.2.3
  - notifications: 0.3.2
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.2
  - updatenotification: 0.2.1
  - user_ldap: 0.10.0
Disabled:
  - encryption
  - external
  - theme-example
  - user_external

Are you using external storage, if yes which one: nfs

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP

LDAP configuration (delete this part if not used)

    "appconfig": {
        "cleanUpJobOffset": "250",
        "enabled": "yes",
        "enforce_home_folder_naming_rule": "",
        "installed_version": "0.10.0",
        "s01has_memberof_filter_support": "",
        "s01home_folder_naming_rule": "attr:destinationIndicator",
        "s01last_jpegPhoto_lookup": "0",
        "s01ldap_agent_password": "***REMOVED SENSITIVE VALUE***",
        "s01ldap_attributes_for_group_search": "",
        "s01ldap_attributes_for_user_search": "",
        "s01ldap_backup_host": "",
        "s01ldap_backup_port": "",
        "s01ldap_base": "***REMOVED SENSITIVE VALUE***",
        "s01ldap_base_groups": "***REMOVED SENSITIVE VALUE***",
        "s01ldap_base_users": "***REMOVED SENSITIVE VALUE***",
        "s01ldap_cache_ttl": "600",
        "s01ldap_configuration_active": "1",
        "s01ldap_display_name": "cn",
        "s01ldap_dn": "***REMOVED SENSITIVE VALUE***",
        "s01ldap_dynamic_group_member_url": "",
        "s01ldap_email_attr": "mail",
        "s01ldap_experienced_admin": "0",
        "s01ldap_expert_username_attr": "uid",
        "s01ldap_expert_uuid_group_attr": "",
        "s01ldap_expert_uuid_user_attr": "",
        "s01ldap_group_display_name": "cn",
        "s01ldap_group_filter": "***REMOVED SENSITIVE VALUE***",
        "s01ldap_group_filter_mode": "0",
        "s01ldap_group_member_assoc_attribute": "memberUid",
        "s01ldap_groupfilter_groups": "***REMOVED SENSITIVE VALUE***",
        "s01ldap_groupfilter_objectclass": "posixGroup",
        "s01ldap_host": "***REMOVED SENSITIVE VALUE***",
        "s01ldap_login_filter": "(&(|(objectclass=inetOrgPerson))(uid=%uid))",
        "s01ldap_login_filter_mode": "1",
        "s01ldap_loginfilter_attributes": "",
        "s01ldap_loginfilter_email": "0",
        "s01ldap_loginfilter_username": "1",
        "s01ldap_nested_groups": "0",
        "s01ldap_override_main_server": "0",
        "s01ldap_paging_size": "500",
        "s01ldap_port": "636",
        "s01ldap_quota_attr": "",
        "s01ldap_quota_def": "50G",
        "s01ldap_tls": "",
        "s01ldap_turn_off_cert_check": "1",
        "s01ldap_user_display_name_2": "",
        "s01ldap_user_filter_mode": "1",
        "s01ldap_userfilter_groups": "",
        "s01ldap_userfilter_objectclass": "inetOrgPerson",
        "s01ldap_userlist_filter": "(|(objectclass=inetOrgPerson))",
        "s01use_memberof_to_detect_membership": "1",
        "types": "authentication"
    }

Client configuration

Browser: chrome, firefox

Operating system: centos 7

Logs

Web server error log

2018/02/01 15:06:36 [error] 13798#0: *64 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to a member function getUID() on null in /local/owncloud-1006/lib/private/User/User.php on line 332" while reading response header from upstream, client: x.x.x.x, server: cloudtest.domaine.fr, request: "POST /login HTTP/2.0", upstream: "fastcgi://unix:/var/run/owncloud.sock:", host: "cloudtest.domaine.fr"
2018/02/01 15:06:47 [error] 13798#0: *64 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to a member function getUID() on null in /local/owncloud-1006/lib/private/User/User.php on line 332" while reading response header from upstream, client: x.x.x.x, server: cloudtest.domaine.fr, request: "POST /login HTTP/2.0", upstream: "fastcgi://unix:/var/run/owncloud.sock:", host: "cloudtest.domaine.fr"

ownCloud log (data/owncloud.log)

{"reqId":"6twUA81O4ybhX0fashBZ","level":3,"time":"2018-02-01T15:06:36+01:00","remoteAddr":"x.x.x.x","user":"--","app":"PHP","method":"POST","url":"\/login","message":"Call to a member function getUID() on null at \/local\/owncloud-1006\/lib\/private\/User\/User.php#332"} 
{"reqId":"AMB9BuwDmp9PwtLF2qJB","level":3,"time":"2018-02-01T15:06:47+01:00","remoteAddr":"x.x.x.x","user":"--","app":"PHP","method":"POST","url":"\/login","message":"Call to a member function getUID() on null at \/local\/owncloud-1006\/lib\/private\/User\/User.php#332"} 


Browser log

On firefox only : 
Content Security Policy: La directive 芦 frame-src 禄 est obsol猫te. Veuillez utiliser la directive 芦 child-src 禄 脿 la place.  (source inconnue)
Content Security Policy: Les param猫tres de la page ont emp锚ch茅 le chargement d鈥檜ne ressource 脿 blob:https://cloudtest.domaine.fr/797379e3-b1b3-42fe-9859-147334fced64 (芦 script-src https://cloudtest.domaine.fr 'unsafe-eval' 禄).
Bug p1-urgent server

All 6 comments

Hello,
Our production is still in 8.2.9, can we apply the updates up to 10.0.3, or wait?
Thank's

there is a null check missing - https://github.com/owncloud/core/blame/v10.0.5/lib/private/User/User.php#L332

@sharidas please have a look - THX

Urgh this issue. Here we mix session / business logic right into our user model. IMO, the 'role' checking to see if the current session can change the displayname should be in the appropriate controller / api method that is asking to make the change - not right down in the user model. When using the user model we dont know if we have a session

The commit 9a1b527ee86f5cba21eaa8828baf8d9c3247cd50 work !
Thanks you very much!

will be in 10.0.7

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

emmenlau picture emmenlau  路  5Comments

j-holub picture j-holub  路  3Comments

fridaynext picture fridaynext  路  5Comments

dpeger picture dpeger  路  3Comments

tommis picture tommis  路  5Comments