A test repository for reproducing a runtime error in intellij's HTTP client when disabling the host verification. (see IDEA-337531)
Issue When adding the "SSLConfiguration" key (e.g. for adding "verifyHostCertificate") to the private env-file (as documented here), the environment fails to load with an exception. This issue does not occur when executing directly in the IDE but when executing with a docker container.
Image: jetbrains/intellij-http-client:232.10203.10
Test Cases:
- use "default" (no sslconfig) → successful parse
- use "with-sslconfig" (empty sslconfig) → failing parse
- use "with-disable" (sslconfig > verification disabled) → failing parse
- use "with-enable" (sslconfig > verification enabled) → failing parse
{
"SSLConfiguration": {
"verifyHostCertificate": false
}
}
Exception:
java.lang.UnsupportedOperationException: JsonObject
at com.google.gson.JsonElement.getAsString(JsonElement.java:187)
at com.intellij.httpClient.cli.HttpClientMain.loadEnvironment(HttpClientMain.kt:300)
at com.intellij.httpClient.cli.HttpClientOptions.call(HttpClientMain.kt:186)
at com.intellij.httpClient.cli.HttpClientOptions.call(HttpClientMain.kt:44)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
at picocli.CommandLine.execute(CommandLine.java:2078)
at com.intellij.httpClient.cli.HttpClientMain.main(HttpClientMain.kt:39)
It does not seem to matter whether the key holds an empty object or additional properties.
Only removing the property from the configuration results in a successful environment load.