New lines are illegal in --serverinfo values#1803
New lines are illegal in --serverinfo values#1803pljones wants to merge 1 commit intojamulussoftware:masterfrom
Conversation
7236d38 to
a7bb996
Compare
| { | ||
| // [this server name] | ||
| ThisServerListEntry.strName = slServInfoSeparateParams[0].left ( MAX_LEN_SERVER_NAME ); | ||
| ThisServerListEntry.strName = slServInfoSeparateParams[0].remove ( reIllegal ).left ( MAX_LEN_SERVER_NAME ); |
There was a problem hiding this comment.
Just removing \n automatically without warning the user might cause confusion. I'd give a warning on stderr and strip the new line afterwards.
There was a problem hiding this comment.
It can go on the Wiki. It's quite difficult to get a new line into the string in the first place - I doubt people are going to use it.
You could argue truncating the server name is surprising people, and that's more commonly hit.
There was a problem hiding this comment.
Hmm yes that’s probably more common. Can you open an issue on the website repo to document this change (new line)? Probably that’s something for @gilgongo s Server manual.
There was a problem hiding this comment.
a7bb996 to
57b5845
Compare
57b5845 to
bf1a3e5
Compare
|
BTW I've added this to the new Server Admin Manual. PR-ing shortly. |
|
Going with a different approach here, so this is no longer needed. |
Required for #1799.