Skip to content

Conversation

klausi
Copy link
Contributor

@klausi klausi commented Nov 19, 2020

https://www.drupal.org/sa-core-2020-012 also affects our custom file upload service.

We don't want to depend on REST module in Drupal core, so I duplicated the code from FileUploadResource and modified it to what we need.

Not really nice, but should cover the security fix and give us comprehensive file name coverage.

We don't need to report this to the Drupal security team because graphql's file upload service is not in any release yet and has just been introduced in #1112 .

@klausi klausi requested a review from rthideaway November 20, 2020 10:12
Copy link
Contributor

@rthideaway rthideaway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, thanks!

// Validate the file entity against entity-level validation and field-level
// validators.
if (!$this->validate($file, $validators, $response)) {
return $response;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we release the lock before returning response?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, you just found a bug in core's FileUploadResource which we copied :)

@klausi
Copy link
Contributor Author

klausi commented Nov 25, 2020

I will merge this now and create a follow-up for the lock bug.

@klausi klausi merged commit 582704b into drupal-graphql:8.x-4.x Nov 25, 2020
@klausi klausi deleted the file-upload-extension branch November 25, 2020 10:35
klausi added a commit to klausi/graphql that referenced this pull request Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants