Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix consumer reply subject escaping #4040

Merged
merged 1 commit into from Apr 12, 2023
Merged

Conversation

Jarema
Copy link
Member

@Jarema Jarema commented Apr 11, 2023

If the Consumer had a name containing %, it could result in the reply subject failing to format with fmt.Sprintf, as the % was not properly escaped with %%.

Resolves #4038

Signed-off-by: Tomasz Pietrek tomasz@nats.io

@Jarema Jarema requested a review from a team as a code owner April 11, 2023 21:55
server/consumer.go Outdated Show resolved Hide resolved
@Jarema Jarema force-pushed the jarema-escape-formatting-symbol branch from 8ccb76a to 00a2f91 Compare April 11, 2023 22:08
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekcollison
Copy link
Member

What of the stream has a % in its name?

Copy link
Contributor

@ripienaar ripienaar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jarema Jarema force-pushed the jarema-escape-formatting-symbol branch from 00a2f91 to add4553 Compare April 12, 2023 07:14
If the Consumer had a name containing `%`, it could result in
reply subject failing to format with `fmt.Sprintf`, as the `%`
was not properly escaped with `%%`.

Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
@Jarema Jarema force-pushed the jarema-escape-formatting-symbol branch from add4553 to 692f384 Compare April 12, 2023 07:22
@Jarema Jarema merged commit 2a03d9d into main Apr 12, 2023
2 checks passed
@Jarema Jarema deleted the jarema-escape-formatting-symbol branch April 12, 2023 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PullSubscribe with '%' character result in disconnect and no messages on fetch
4 participants