Skip to content

extraneous .replace in encodeRequestToS3Key #6

@ElectricNroff

Description

@ElectricNroff

for https://github.com/dwelch2344/cve-ref-archival/blob/24ca51169ff07766fc5d35a2ab3bc8b2a47c195c/src/engine/aws/s3.ts#L50

const safePath = pathname.replace(/[^\w\-\.]/g, '-').replace(/\/+/g, '_');

A / character is converted to a - character by the first .replace call, so the second .replace will never replace / with _

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions