Skip to content

ClientWebSocket options are potentially silently ignored in case an invoker is passed #74416

Description

@CarnaViire

Also discovered while looking at ClientWebSocket code.

If the user both passes a custom HttpMessageInvoker and sets security options like Credentials or RemoteCertificateValidationCallback, they seem to be just silently ignored, as the passed HttpMessageInvoker will be used without checking the options.

invoker ??= new HttpMessageInvoker(SetupHandler(options, out disposeHandler));

This might result in security issues.

Unless I miss something and there are checks somewhere that I haven't found, I believe we should forbid setting the security options in case a custom invoker is passed.

cc @greenEkatherine

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions