Skip to content

oc_preferences contains outdated email addresses #7306

@busted-it-guy

Description

@busted-it-guy

Update by @ChristophWurst: the oc_preferences table contained outdated email addresses because the email address scheme was changed once. IMO this should not result in inconsitent data or even errors like these. Apparently the email login uses a quick and dirty hack to look up UIDs for email addresses by querying the user preferences for email addresses and takes the very first one. If the first one is wrong, this fails hard because the UID mapping is wrong.
This has been fixed manually: #7306 (comment).


Nextcloud version (eg, 10.0.2): 12.0.1 RC4
Operating system and version (eg, Ubuntu 16.04): Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): apache
PHP version (eg, 5.6): 7.0.2.2
Is this the first time you’ve seen this error?: No but first time reporting

Can you reliably replicate it? (If so, please outline steps): No but it logs every couple of seconds or so it seems

The issue you are facing:

Our log is being flooded with:
Fatal webdav Sabre\DAV\Exception\ServiceUnavailable: TypeError: Argument 1 passed to OC\Authentication\TwoFactorAuth\Manager::isTwoFactorAuthenticated() must be an instance of OCP\IUser, null given, called in /var/www/nextcloud/lib/private/User/Session.php on line 453
[internal function] {closure}(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Object(Closure), Array)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 466: Sabre\Event\EventEmitter->emit(‘beforeMethod’, Array)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/nextcloud/remote.php - line 70: Sabre\DAV\Server->exec()
/var/www/nextcloud/remote.php - line 167: handleException(Object(TypeError))
{main}

The output of your Nextcloud log in Admin > Logging:

This would be a spamming of the above error for days


‘trusted_domains’ =>
array (
0 => ‘digitalfile.domain1.com’,
1 => ‘digital.domain2.com’,
),
‘datadirectory’ => ‘/var/www/nextcloud-data’,
‘overwrite.cli.url’ => ‘http://digital.domain2.com’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘12.0.1.3’,
‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘nextclouduser’,
‘dbpassword’ => ‘***********’,
‘logtimezone’ => ‘UTC’,
‘installed’ => true,
‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘localhost’,
‘port’ => 6379,
),
‘ldapIgnoreNamingRules’ => false,
‘ldapProviderFactory’ => ‘\OCA\User_LDAP\LDAPProviderFactory’,
‘updater.release.channel’ => ‘daily’,
‘maintenance’ => false,
‘theme’ => ‘’,
‘loglevel’ => 2,
‘mail_smtpmode’ => ‘smtp’,
‘mail_smtpauthtype’ => ‘LOGIN’,
‘mail_from_address’ => ‘digital-file-transfer’,
‘mail_domain’ => ‘domain1,com’,
‘mail_smtphost’ => ‘smtp.office365.com’,
‘mail_smtpport’ => ‘587’,
‘mail_smtpsecure’ => ‘tls’,
‘mail_smtpauth’ => 1,
‘mail_smtpname’ => ‘user@domain1.com’,
‘mail_smtppassword’ => ‘**********’,
);

m.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions