File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/main/java/net/imagej/updater/util Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 8
8
import java .io .IOException ;
9
9
import java .net .HttpURLConnection ;
10
10
import java .net .ProtocolException ;
11
+ import java .net .SocketException ;
11
12
import java .net .SocketTimeoutException ;
12
13
import java .net .URL ;
13
14
import java .net .UnknownHostException ;
@@ -56,6 +57,12 @@ public static void checkHTTPSSupport(LogService log) {
56
57
"Please contact your system administrator to enable communication via HTTPS." ;
57
58
if (log != null ) log .warn (msg );
58
59
else System .out .println ("[WARNING] " + msg );
60
+ } catch (SocketException e ) {
61
+ secureMode = false ;
62
+ String msg = "SocketException while trying to update securely via HTTPS. Will fall back to HTTP. This is a security risk. " +
63
+ "Try downloading a new version of this software. If you're behind a proxy, call Edit > Options > Proxy Settings." ;
64
+ if (log != null ) log .warn (msg );
65
+ else System .out .println ("[WARNING] " + msg );
59
66
} catch (IOException e ) {
60
67
e .printStackTrace ();
61
68
}
You can’t perform that action at this time.
0 commit comments