Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUser changes e-mail, validation only partly triggered #21336
Comments
|
In AccountManager.php#173 an empty verificationCode is set. If I add something here it's added to the job as well, but nothing happens. Seems to me like this feature is not fully implemented anymore. |
Why do you think a verification email should be sent? |
|
Well, why would a job be generated for every e-mail change including an empty "verificationCode"? |
That would be the actual behaviour than. Are you sure it's the same job or just another one for the same email?
It seems nextcloud tries to validate a email against a lookup server. I don't know what that is and why but it also includes some retry logic to do this multiple times. The job queue itself is working? Cron runs very 5 minutes and work on some jobs? I think in oc_jobs the last execution is logged. If you change the loglevel to 0 the job execution is logged. Run xyz job with ID. That might help to find running / not running jobs. |
|
If you run a similar setup like #21212 (lookupServerUploadEnabled == 'no') you may end up with a job for each email change that stays in the queue for at least 24 hours. I guess we could tweak that a bit by not re scheduling the job if the configuration disables it anyway. |
|
Is the code in question. The idea is to not add a verify user data job again if the preconditions are not fulfilled:
|
My apologies, you're right: That is the actual behavior. I verified again (also with the code you referred to): The old job is removed and a new job with argument try+1 is created. So after a while they should be altogether gone.
Yes, the queue is working and all jobs but the ones with class "OCA\Settings\BackgroundJobs\VerifyUserData" update their last_run date. The VerifyUserData job stores that information in the arguments column:
Did that. The jobs are running with the only result the re-scheduling.
Re: "(lookupServerUploadEnabled == 'no')" Thank you already for your help & improvement. |
How to use GitHub
Steps to reproduce
3a. As user: Watch e-mail address getting stored, nothing more.
3b. As admin: Check database to see additional job.
Expected behaviour
Either send verification e-mail or don't create verification job without any verification data.
Actual behaviour
No verification mail is sent but verification job without verification data is created.
Server configuration
Operating system: Linux, details unknown
Web server: Apache
Database: MySQL
PHP version: 7.4.5
Nextcloud version: 19.0.0 (but bug was present before; I have jobs for accounts that where deleted before 19.0.0 upgrade)
Updated from an older Nextcloud/ownCloud or fresh install: Update
Where did you install Nextcloud from: nextcloud.com / Updater
Signing status:
Signing status
No errors have been found.List of activated apps:
App list
Default
AppOrder
Deck
Forms
Polls
Nextcloud configuration:
Config report
‘…’, 'passwordsalt' => ‘…’, 'secret' => ‘…’, 'trusted_domains' => array ( 0 => ‘xyz.example.com', ), 'datadirectory' => '/www/htdocs/xyz.example.com/data', 'dbtype' => 'mysql', 'version' => '19.0.0.12', 'overwrite.cli.url' => 'https://xyz.example.com/', 'htaccess.RewriteBase' => '/', 'htaccess.IgnoreFrontController' => true, 'dbname' => ‘…’, 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => ‘…’, 'dbpassword' => ‘…’, 'installed' => true, 'mail_smtpmode' => 'sendmail', 'mail_sendmailmode' => 'smtp', 'mail_from_address' => 'noreply', 'mail_domain' => ‘example.com’, 'tempdirectory' => '/www/htdocs/tmp', 'updater.secret' => ‘…’, 'maintenance' => false, 'theme' => '', 'loglevel' => 2, 'defaultapp' => 'calendar', 'skeletondirectory' => '', 'filesystem_check_changes' => 1, 'default_language' => 'de', 'default_locale' => 'de', 'updater.release.channel' => 'stable', );Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Client configuration
Browser: any
Operating system: any
Logs
Web server error log
no access
Nextcloud log (data/nextcloud.log)
Nextcloud log
https://pastebin.com/YiX1BWS5
Browser log
as before: any browser/os