-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix logger overwriting vars in some circumstances #32898
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
Conversation
|
/backport to stable25 |
|
/backport to stable24 |
|
/backport to stable23 |
|
special thanks to @miaulalala and @mgallien for the debugging sessions <3 |
5da846c to
52839f6
Compare
come-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nasty one
866baac to
7d443de
Compare
skjnldsv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
Signed-off-by: Arthur Schiwon <[email protected]>
Signed-off-by: Arthur Schiwon <[email protected]>
Signed-off-by: Arthur Schiwon <[email protected]>
7d443de to
8b2b594
Compare
|
The backport to stable25 failed. Please do this backport manually. |
|
/backport to stable22 |
off by one 🤭 |
We were investigating one case, indicated by the error
foreach() argument must be of type array|object, string givenThis can be reproduce like this:
1.) in php.ini, zend.exception_ignore_args is set to "Off" (PHP default, check distro in doubt)
2.) app files_lock enabled
3.) use an addressbook client (like KAddressbook)
4.) there, add a new contact
You will see an exception like:
{ "Exception": "Error", "Message": "Invalid argument supplied for foreach() at /srv/http/nextcloud/stable24/3rdparty/sabre/dav/lib/DAV/Server.php#1454", "Code": 0, "Trace": [ { "file": "/srv/http/nextcloud/stable24/3rdparty/sabre/dav/lib/DAV/Server.php", "line": 1454, "function": "onAll", "class": "OC\\Log\\ErrorHandler", "type": "::", "args": [ 2, "Invalid argument supplied for foreach()", "/srv/http/nextcloud/stable24/3rdparty/sabre/dav/lib/DAV/Server.php", 1454, { "request": { "__class__": "Sabre\\HTTP\\Request" }, "response": { "__class__": "Sabre\\HTTP\\Response" }, "path": "addressbooks/users/stable24/contacts/1655379707.R254.vcf", "node": null, "lastMod": null, "etag": null, "ifMatch": null, "e": { "__class__": "Sabre\\DAV\\Exception\\NotFound" }, "ifNoneMatch": "*", "nodeExists": false, "ifUnmodifiedSince": null, "ifConditions": "*** sensitive parameter replaced ***" } ] }, { "file": "/srv/http/nextcloud/stable24/3rdparty/sabre/dav/lib/DAV/Server.php", "line": 466, "function": "checkPreconditions", "class": "Sabre\\DAV\\Server", "type": "->", "args": [ { "__class__": "Sabre\\HTTP\\Request" }, { "__class__": "Sabre\\HTTP\\Response" } ] }, { "file": "/srv/http/nextcloud/stable24/3rdparty/sabre/dav/lib/DAV/Server.php", "line": 253, "function": "invokeMethod", "class": "Sabre\\DAV\\Server", "type": "->", "args": [ { "__class__": "Sabre\\HTTP\\Request" }, { "__class__": "Sabre\\HTTP\\Response" } ] }, { "file": "/srv/http/nextcloud/stable24/3rdparty/sabre/dav/lib/DAV/Server.php", "line": 321, "function": "start", "class": "Sabre\\DAV\\Server", "type": "->", "args": [] }, { "file": "/srv/http/nextcloud/stable24/apps/dav/lib/Server.php", "line": 352, "function": "exec", "class": "Sabre\\DAV\\Server", "type": "->", "args": [] }, { "file": "/srv/http/nextcloud/stable24/apps/dav/appinfo/v2/remote.php", "line": 35, "function": "exec", "class": "OCA\\DAV\\Server", "type": "->", "args": [] }, { "file": "/srv/http/nextcloud/stable24/remote.php", "line": 166, "args": [ "/srv/http/nextcloud/stable24/apps/dav/appinfo/v2/remote.php" ], "function": "require_once" } ], "File": "/srv/http/nextcloud/stable24/lib/private/Log/ErrorHandler.php", "Line": 99, "CustomMessage": "--" }The hidden issue is that a variable, passed by reference, was overwritten. I used to be an array and was turned into a string
*** sensitive parameter replaced ***.Now we have a test to reproduce the issue and the fix.
This problem popped up in a related scenario, where we committed a temporary fix: #32685