8000 [FileSystem] tempnam doesn't work on Google App Engine · Issue #17922 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[FileSystem] tempnam doesn't work on Google App Engine #17922
Closed
@mtricht

Description

@mtricht

Hi,

In the FileSystem component the x+ mode is used to create a temporary file. This is sadly not supported by Google App Engine. GAE only supports these modes: r, rb, rt, w, wb, wt. (https://cloud.google.com/appengine/docs/php/googlestorage/advanced#php_filesystem_functions_support_on_google_cloud_storage)

The line in question:

$handle = @fopen($tmpFile, 'x+');

Could this perhaps be changed in the component? I understand the use of the x+ mode here is to prevent a TOCTOU vulnerability, but I need to change this to get symfony working in GAE.

I have a 'fix' (Adding gs to this line

if (null === $scheme || 'file' === $scheme) {
) but it is certainly not a fix that we need merged in the Symfony component. I'm new to Symfony and I don't see how I would extend the component without forking the repository.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0