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

Add -webExternalNames setting and fix WebServer.getConnection() #3377

Merged
merged 2 commits into from
Jan 15, 2022

Conversation

katzyn
Copy link
Contributor

@katzyn katzyn commented Jan 15, 2022

No description provided.

@katzyn katzyn merged commit ccaadc0 into h2database:master Jan 15, 2022
@katzyn katzyn deleted the web branch January 15, 2022 02:39
output.write(Integer.toHexString(bytes.length).getBytes());
output.write("\r\n".getBytes());
output.write(bytes);
output.write("\r\n".getBytes());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefaultCharset: Implicit use of the platform default charset, which can result in differing behaviour between JVM executions or incorrect behavior if the encoding of the data source doesn't match expectations. (details)
(at-me in a reply with help or ignore)

if (bytes.length == 0) {
continue;
}
output.write(Integer.toHexString(bytes.length).getBytes());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefaultCharset: Implicit use of the platform default charset, which can result in differing behaviour between JVM executions or incorrect behavior if the encoding of the data source doesn't match expectations. (details)
(at-me in a reply with help or ignore)

}
message += "Content-Length: " + bytes.length + "\r\n";
output.write("0\r\n\r\n".getBytes());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefaultCharset: Implicit use of the platform default charset, which can result in differing behaviour between JVM executions or incorrect behavior if the encoding of the data source doesn't match expectations. (details)
(at-me in a reply with help or ignore)

message += "Transfer-Encoding: chunked\r\n";
message += "\r\n";
trace(message);
output.write(message.getBytes());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefaultCharset: Implicit use of the platform default charset, which can result in differing behaviour between JVM executions or incorrect behavior if the encoding of the data source doesn't match expectations. (details)
(at-me in a reply with help or ignore)

message += "Content-Length: " + bytes.length + "\r\n";
message += "\r\n";
trace(message);
output.write(message.getBytes());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefaultCharset: Implicit use of the platform default charset, which can result in differing behaviour between JVM executions or incorrect behavior if the encoding of the data source doesn't match expectations. (details)
(at-me in a reply with help or ignore)

@@ -375,10 +380,21 @@ public String getURL() {
return url;
}

/**
* @return host name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MissingSummary: A summary fragment is required; consider using the value of the @return block as a summary fragment instead. (details)
(at-me in a reply with help or ignore)

}
String externalNames = server.getExternalNames();
if (externalNames != null && !externalNames.isEmpty()) {
for (String s : externalNames.split(",")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StringSplitter: String.split(String) has surprising behavior (details)
(at-me in a reply with help or ignore)

if (url.startsWith(Constants.START_URL)) {
JdbcConnection connection = new JdbcConnection(url, null, user, password);
JdbcConnection connection = new JdbcConnection(url, null, user, password, forbidCreation);
if (networkConnectionInfo != null) {
connection.getSession().setNetworkConnectionInfo(networkConnectionInfo);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NULL_DEREFERENCE: object returned by getSession(connection) could be null and is dereferenced at line 290.
(at-me in a reply with help or ignore)

boris-unckel added a commit to boris-unckel/h2database that referenced this pull request Dec 23, 2022
Not a true backport, but a full block of the dangerous options. In the original upstream PR
there remains the option to enable these things. The change is too complex for 1.4.x.

Upstream h2database#3377
  out of https://github.com/h2database/h2database/releases/tag/version-2.1.210

Advisory
GHSA-45hx-wfhj-473x
boris-unckel added a commit to boris-unckel/h2database that referenced this pull request Dec 24, 2022
Not a true backport, but a full block of the dangerous options. In the original upstream PR
there remains the option to enable these things. The change is too complex for 1.4.x.

Upstream h2database#3377
out of https://github.com/h2database/h2database/releases/tag/version-2.1.210

Advisory
GHSA-45hx-wfhj-473x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant