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

The IPv6 web console bug has been resolved, and it is now working. #3992

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions h2/src/main/org/h2/server/web/WebThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,19 @@ private boolean checkHost(String host) throws IOException {
writeSimple("HTTP/1.1 400 Bad Request", "Bad request");
return false;
}
int index = host.indexOf(':');
int index = host.lastIndexOf(':');

pavangabani marked this conversation as resolved.
Show resolved Hide resolved
if (index >= 0) {
host = host.substring(0, index);
}
if (host.isEmpty()) {
return false;
}
host = StringUtils.toLowerEnglish(host);
if (host.equals(server.getHost()) || host.equals("localhost") || host.equals("127.0.0.1")) {
if (host.equals(server.getHost()) ||
host.equals("localhost") ||
host.equals("127.0.0.1") ||
host.equals("[::1]")) {
return true;
}
String externalNames = server.getExternalNames();
Expand Down
Loading