Relax (i.e. remove all checks) on the hostname.

While validating this is a good idea, it causes too many issues in
practice. We will still clean the server address but no validation is
performed on the address.
This commit is contained in:
Andrew Steinborn
2019-03-06 17:45:38 -05:00
parent c8e3e7ff94
commit 5ccf22c5c4
2 changed files with 1 additions and 7 deletions

View File

@@ -42,6 +42,6 @@ public interface ConnectionType {
* @return true if valid. * @return true if valid.
*/ */
default boolean checkServerAddressIsValid(String address) { default boolean checkServerAddressIsValid(String address) {
return !address.contains("\0"); return true;
} }
} }

View File

@@ -31,10 +31,4 @@ public class LegacyForgeConnectionType extends ConnectionTypeImpl {
return original; return original;
} }
@Override
public boolean checkServerAddressIsValid(String address) {
return super.checkServerAddressIsValid(
address.replaceAll(LegacyForgeConstants.HANDSHAKE_HOSTNAME_TOKEN, ""));
}
} }