nats-io / natscli

The NATS Command Line Interface
Apache License 2.0
496 stars 99 forks source link

Fix whitespace check to include newlines #1103

Closed ReubenMathew closed 3 months ago

ReubenMathew commented 3 months ago

1096 only checks for `, while other characters (e.g.,\n` in the server name can still break the cluster.

Signed-off-by: reubenninan reuben@nats.io

ripienaar commented 3 months ago

@ReubenMathew @mprimi lets get this one in so I can do the maintenance release asap thanks!

ReubenMathew commented 3 months ago

@ReubenMathew @mprimi lets get this one in so I can do the maintenance release asap thanks!

Have we decided if space and newline characters are enough to check for? Should we just be safe and use unicode.IsSpace?

ripienaar commented 3 months ago

The Unicode check doesn’t solve any actual problems. So space and new line seems to address the problem.