-
Notifications
You must be signed in to change notification settings - Fork 203
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
Fix fatal error in DownloadController #3154
Conversation
Regression from IBEXA-SA-2023-005
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@@ -63,7 +63,7 @@ public function downloadBinaryFileByIdAction(Request $request, int $contentId, i | |||
protected function findFieldInContent(int $fieldId, Content $content): Field | |||
{ | |||
foreach ($content->getFields() as $field) { | |||
if ($field->getId() === $fieldId) { | |||
if ($field->id === $fieldId) { |
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.
Normally I would request to add missing getId
method, but given this is unmaintained 2.5 fix and it can go into 2.5 only, I'll allow it. Magic is bad because of performance (from 0.2s to 5s when it's scaled to e.g 30 000 calls, which is not uncommon on simple properties).
Here we can leave it as-is.
@glye seems this one got forgotten. Are those CI issues something we can fix? |
@alongosz Not forgotten, it was sent to QA some time ago, but I see I must fix the labels here. "The operation was cancelled" in the REST test I have no idea about. The constant time auth test in AppVeyor I should find time to look into. |
Oh. My bad, I missed it. Thanks for clarifying and fixing labels. Cancelled operation usually means that there were not enough resources and job exceeded time limit (unless cancelled manually). I restarted it, let's see if there are issues. We don't worry about AppVeyor, it's very old CI for Windows support. We don't have it on maintained branches anymore. |
@glye REST Functional tests are executed using |
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.
Reproduced and retested on eZ Platform 2.5.32 / eZ Commerce 2.5.21.
Regression from IBEXA-SA-2023-005
v2.5
Fatal error "undefined method getId" on download. Regression from IBEXA-SA-2023-005:
https://developers.ibexa.co/security-advisories/ibexa-sa-2023-005-vulnerabilities-in-solr-search-and-file-downloads
Checklist:
$ composer fix-cs
).@ezsystems/engineering-team
).