Skip to content

Do not reuse query builder objects in DAV account deletion - #36487

Merged
nickvergessen merged 1 commit into
masterfrom
bugfix/noid/fix-query-builder-usage-in-dav-account-deletion
Feb 2, 2023
Merged

Do not reuse query builder objects in DAV account deletion#36487
nickvergessen merged 1 commit into
masterfrom
bugfix/noid/fix-query-builder-usage-in-dav-account-deletion

Conversation

@nickvergessen

Copy link
Copy Markdown
Member

Ref #36261

Summary

Every talk integration test before:

{"Exception":"Doctrine\\DBAL\\Query\\QueryException","Message":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first.","Code":0,"Trace":[{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/dav\/lib\/CalDAV\/CalDavBackend.php","line":901,"function":"where","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/dav\/lib\/HookManager.php","line":140,"function":"deleteCalendar","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/legacy\/OC_Hook.php","line":105,"function":"postDeleteUser","class":"OCA\\DAV\\HookManager","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Server.php","line":591,"function":"emit","class":"OC_Hook","type":"::"},{"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Hooks\/EmitterTrait.php","line":105,"function":"call_user_func_array"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Hooks\/PublicEmitter.php","line":40,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/User\/User.php","line":312,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/provisioning_api\/lib\/Controller\/UsersController.php","line":1095,"function":"delete","class":"OC\\User\\User","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":230,"function":"deleteUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/App.php","line":171,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Route\/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v2.php","line":23,"args":["\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v1.php"],"function":"require_once"}],"File":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/DB\/QueryBuilder\/QueryBuilder.php","Line":869,"message":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first.","exception":{},"CustomMessage":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first."}
{"Exception":"Doctrine\\DBAL\\Query\\QueryException","Message":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first.","Code":0,"Trace":[{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/dav\/lib\/CalDAV\/CalDavBackend.php","line":909,"function":"where","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/dav\/lib\/HookManager.php","line":140,"function":"deleteCalendar","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/legacy\/OC_Hook.php","line":105,"function":"postDeleteUser","class":"OCA\\DAV\\HookManager","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Server.php","line":591,"function":"emit","class":"OC_Hook","type":"::"},{"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Hooks\/EmitterTrait.php","line":105,"function":"call_user_func_array"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Hooks\/PublicEmitter.php","line":40,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/User\/User.php","line":312,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/provisioning_api\/lib\/Controller\/UsersController.php","line":1095,"function":"delete","class":"OC\\User\\User","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":230,"function":"deleteUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/App.php","line":171,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Route\/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v2.php","line":23,"args":["\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v1.php"],"function":"require_once"}],"File":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/DB\/QueryBuilder\/QueryBuilder.php","Line":869,"message":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first.","exception":{},"CustomMessage":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first."}
{"Exception":"Doctrine\\DBAL\\Query\\QueryException","Message":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first.","Code":0,"Trace":[{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/dav\/lib\/CardDAV\/CardDavBackend.php","line":456,"function":"where","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/dav\/lib\/HookManager.php","line":152,"function":"deleteAddressBook","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/legacy\/OC_Hook.php","line":105,"function":"postDeleteUser","class":"OCA\\DAV\\HookManager","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Server.php","line":591,"function":"emit","class":"OC_Hook","type":"::"},{"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Hooks\/EmitterTrait.php","line":105,"function":"call_user_func_array"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Hooks\/PublicEmitter.php","line":40,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/User\/User.php","line":312,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/provisioning_api\/lib\/Controller\/UsersController.php","line":1095,"function":"delete","class":"OC\\User\\User","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":230,"function":"deleteUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/App.php","line":171,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Route\/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v2.php","line":23,"args":["\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v1.php"],"function":"require_once"}],"File":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/DB\/QueryBuilder\/QueryBuilder.php","Line":869,"message":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first.","exception":{},"CustomMessage":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first."}
{"Exception":"Doctrine\\DBAL\\Query\\QueryException","Message":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first.","Code":0,"Trace":[{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/dav\/lib\/CardDAV\/CardDavBackend.php","line":461,"function":"where","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/dav\/lib\/HookManager.php","line":152,"function":"deleteAddressBook","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/legacy\/OC_Hook.php","line":105,"function":"postDeleteUser","class":"OCA\\DAV\\HookManager","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Server.php","line":591,"function":"emit","class":"OC_Hook","type":"::"},{"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Hooks\/EmitterTrait.php","line":105,"function":"call_user_func_array"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Hooks\/PublicEmitter.php","line":40,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/User\/User.php","line":312,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/provisioning_api\/lib\/Controller\/UsersController.php","line":1095,"function":"delete","class":"OC\\User\\User","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":230,"function":"deleteUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/App.php","line":171,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Route\/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v2.php","line":23,"args":["\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v1.php"],"function":"require_once"}],"File":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/DB\/QueryBuilder\/QueryBuilder.php","Line":869,"message":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first.","exception":{},"CustomMessage":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first."}
{"Exception":"Doctrine\\DBAL\\Query\\QueryException","Message":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first.","Code":0,"Trace":[{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/dav\/lib\/CardDAV\/CardDavBackend.php","line":468,"function":"where","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/dav\/lib\/HookManager.php","line":152,"function":"deleteAddressBook","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/legacy\/OC_Hook.php","line":105,"function":"postDeleteUser","class":"OCA\\DAV\\HookManager","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Server.php","line":591,"function":"emit","class":"OC_Hook","type":"::"},{"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Hooks\/EmitterTrait.php","line":105,"function":"call_user_func_array"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Hooks\/PublicEmitter.php","line":40,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/User\/User.php","line":312,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/apps\/provisioning_api\/lib\/Controller\/UsersController.php","line":1095,"function":"delete","class":"OC\\User\\User","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":230,"function":"deleteUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/AppFramework\/App.php","line":171,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/Route\/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v2.php","line":23,"args":["\/home\/nickv\/Nextcloud\/26\/server\/ocs\/v1.php"],"function":"require_once"}],"File":"\/home\/nickv\/Nextcloud\/26\/server\/lib\/private\/DB\/QueryBuilder\/QueryBuilder.php","Line":869,"message":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first.","exception":{},"CustomMessage":"Using where() on non-empty WHERE part, please verify it is intentional to not call whereAnd() or whereOr() instead. Otherwise consider creating a new query builder object or call resetQueryPart('where') first."}

Afterwards:

# no output

Checklist

Signed-off-by: Joas Schilling <coding@schilljs.com>
@ChristophWurst

Copy link
Copy Markdown
Member

No backport?

@nickvergessen

Copy link
Copy Markdown
MemberAuthor

/backport to stable25

@nickvergessen

Copy link
Copy Markdown
MemberAuthor

/backport to stable24

@nickvergessen

Copy link
Copy Markdown
MemberAuthor

/backport to stable23

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugfeature: dav

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@nickvergessen@ChristophWurst@tcitworld