forked from MirrorHub/authlib-injector
Warn if using HTTP
This commit is contained in:
parent
eebacfa567
commit
8dadd210fc
1 changed files with 7 additions and 0 deletions
|
@ -99,6 +99,7 @@ public final class AuthlibInjector {
|
|||
String apiRoot = System.getProperty(PROP_API_ROOT);
|
||||
if (apiRoot == null) return empty();
|
||||
Logging.CONFIG.info("API root: " + apiRoot);
|
||||
warnIfHttp(apiRoot);
|
||||
|
||||
String metadataResponse;
|
||||
|
||||
|
@ -138,6 +139,12 @@ public final class AuthlibInjector {
|
|||
return of(configuration);
|
||||
}
|
||||
|
||||
private static void warnIfHttp(String url) {
|
||||
if (url.toLowerCase().startsWith("http://")) {
|
||||
Logging.CONFIG.warning("You are using HTTP protocol, which is INSECURE! Please switch to HTTPS if possible.");
|
||||
}
|
||||
}
|
||||
|
||||
private static ClassTransformer createTransformer(YggdrasilConfiguration config) {
|
||||
ClassTransformer transformer = new ClassTransformer();
|
||||
transformer.debugSaveClass = "true".equals(System.getProperty(PROP_DUMP_CLASS));
|
||||
|
|
Loading…
Reference in a new issue