• Marijn Kruisselbrink's avatar
    Reland "Reland "[FSA] Add IsSafePathComponent checks to GetFile/GetDirectoryHandle."" · a66dbdcf
    Marijn Kruisselbrink authored
    This is a reland of 2d41c395
    
    The added test was modified to no longer assert that all unsafe files
    were written to disk successfully. This should make the test pass (albeit
    with less stringent checks) on file systems/platforms that don't allow
    all unsafe file names.
    
    Original change's description:
    > Reland "[FSA] Add IsSafePathComponent checks to GetFile/GetDirectoryHandle."
    >
    > This is a reland of 00437792
    >
    > The main difference is to make sure iterating over a directory doesn't
    > return files we don't want to expose either (and not CHECK failing if
    > such files are found when iterating).
    >
    > Original change's description:
    > > [FSA] Add IsSafePathComponent checks to GetFile/GetDirectoryHandle.
    > >
    > > This isn't directly using net::IsSafePortablePathComponent since what
    > > is safe for the File System Access API is not the same as what is safe
    > > for Downloads. As such currently this duplicates a lot of the
    > > implementation of this method, but in a followup we should attempt to
    > > unify these two implementations as much as possible.
    > >
    > > Bug: 1150810, 1154757
    > > Change-Id: Iba4c92ef5f1cd924aa22b9dd201762d48b4bbc3b
    > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568383
    > > Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
    > > Reviewed-by: Victor Costan <pwnall@chromium.org>
    > > Cr-Commit-Position: refs/heads/master@{#833042}
    >
    > Bug: 1150810
    > Bug: 1154757
    > Change-Id: I3341b9824a1ac4cbd6f100355960ad55b01f0753
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575370
    > Commit-Queue: Victor Costan <pwnall@chromium.org>
    > Reviewed-by: Victor Costan <pwnall@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#834118}
    
    Bug: 1150810
    Bug: 1154757
    Change-Id: Ie5cad9a7b2383c89b96e8a7be6cfe75ad2555fa6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2577614
    Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
    Auto-Submit: Marijn Kruisselbrink <mek@chromium.org>
    Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#834598}
    a66dbdcf
BUILD.gn 107 KB