Closed (fixed)
Project:
Drupal core
Version:
10.3.x-dev
Component:
jsonapi.module
Priority:
Critical
Category:
Task
Assigned:
Reporter:
Created:
2 May 2024 at 05:54 UTC
Updated:
12 Jun 2024 at 21:27 UTC
Jump to comment: Most recent
As part of #2940383: [META] Unify file upload logic of REST and JSON:API and a follow up to #3401734: Refactor FileUploadResource to use FileUploadHandler we want to factor out common file upload code. Duplicated code has been the source of numerous bugs and security issues in the past.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kim.pepperThis is postponed on #3401734: Refactor FileUploadResource to use FileUploadHandler as we are adding some new classes there that we will need here.
Comment #3
kim.pepper#3401734: Refactor FileUploadResource to use FileUploadHandler is in so this is unblocked. 🙌
Comment #4
kim.pepperComment #6
kim.pepperComment #7
andypostone test failed and I left a question for constructor's BC
Comment #9
kim.pepperCreated MR for 10.4.x with BC layer.
Comment #10
kim.pepperFeedback addressed and MR for 10.4.x created with BC layer.
Comment #11
bbralaAwesome to see this moving!
Quick contrib search:
Seems we are not really doing anything impactfull against contrib.
I've checked the CR, its small, but fine i think.
BC paths make sense for new arguments for the controller.
Gone though the code, have some questions :) This feels rather close, and i'll be quite happy to have the "Temporary" class killed :D
Comment #12
kim.pepperThanks for the review. I've addressed all feedback.
Committed on 20 Mar 2019 so temporary for 5 years. 🤣
Comment #13
bbralaEverything in #11 has been adressed.
Think this is fine. BC is a bit hard to fully consider, but i think we have enough. All threads have been resolved, RTBC for me <3
Comment #14
alexpottCan we change the 10.4.x deprecations to be for 10.3.x - I think it is the best option because I think doing 10.3.x deprecation and remove in 11 would put us in a better situation wrt to security. Having something that can do file uploads around for the whole 11.x cycle that is unused and untested feels like a v bad idea.
Comment #15
bbralaSounds like a playing. I'll wait for Kim to update and review the changes.
Comment #16
kim.pepperChanged to `drupal:10.3.0` for removal in `drupal:11.0.0`.
Comment #17
bbralaYou still need to chnage the target of the mr I think. It's still targeting 10.4
Comment #18
alexpott@bbrala as long as it applies to 10.3.x we're fine - and it will. Given this only text changes I think the rtbc from #13 stands.
Comment #19
alexpottCommitted and pushed a52cdfad63 to 11.x and 007556a098 to 11.0.x. Thanks!
Committed and pushed b10e96de15 to 10.4.x and be2b4ec313 to 10.3.x. Thanks!
Comment #24
alexpottComment #25
kim.pepperOh wow. This wraps up years of effort unifying file uploads. 🥲
Comment #26
bbralaHehe, thanks Alex :)
Congrats Kim! :)
Comment #27
xjm