Skip to content

Revisit Seekability of writable zip streams #1364

Open
@weltkante

Description

@weltkante

In PR #1311 (issue #585) two writable streams (Certificate.cs and XmlDigitalSignatureProcessor.cs) get wrapped in a memory stream by calling the new method GetSeekableStream(FileMode.Create, FileAccess.Write). It is unclear from the PR source how the written data will be propagated to the actual zip stream. Since this was noticed after the PR merged I'm opening a separate issue to revisit the handling of writable streams.

I'd also argue that the current implementation of GetSeekableStream should not have had FileMode and FileAccess paramters, since the only case which is handled correctly is the open/read combination.

I'd suggest either providing a dedicated stream wrapper class and keeping FileMode/FileAccess, or remove FileMode/FileAccess and provide a separate code path for callers who want to write data.

Related: issue #1363 apparently still has call sites which do not get wrapped

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugProduct bug (most likely)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions