Mojira Archive
MC-2140

Connecting to a server with a space in the name fails

The bug

Should DNS names be validated to be correct, then remove incorrect characters? Or at least strip whitespace on either side?

How to reproduce

Connect to " x.nerd.nu", you'll get an error about the server not being found.

Potential fix

Easy way to fix in java:

String servername; //assuming we're storing the info from the "Server Address" box into a string
servername = servername.trim();