Compare commits

...

5 commits

Author SHA1 Message Date
Gravita
74af58bc7a [ANY] Remove deprecated flag 2023-04-28 01:02:40 +07:00
Gravita
d97b856ad6 [FIX] Update mysql connector 2023-04-28 00:08:31 +07:00
Gravita
5436b2a2d6 [FIX] Double read textures 2023-04-27 21:12:21 +07:00
Gravita
5aa4fe8d47 [ANY] Update modules 2023-04-27 21:03:21 +07:00
Gravita
b10535042f [FIX] FileAuthSystem slim support 2023-04-27 21:02:30 +07:00
6 changed files with 15 additions and 16 deletions

View file

@ -29,7 +29,7 @@ public RequestTextureProvider(String skinURL, String cloakURL) {
private static Texture getTexture(String url, boolean cloak) throws IOException {
try {
return new Texture(url, cloak);
return new Texture(url, cloak, null);
} catch (FileNotFoundException ignored) {
return null; // Simply not found
}
@ -37,7 +37,7 @@ private static Texture getTexture(String url, boolean cloak) throws IOException
private static Texture getTexture(String url, Path local, boolean cloak) throws IOException {
try {
return new Texture(url, local, cloak);
return new Texture(url, local, cloak, null);
} catch (FileNotFoundException ignored) {
return null; // Simply not found
}

View file

@ -24,7 +24,7 @@ public final class Texture extends StreamObject {
public final Map<String, String> metadata;
public Texture(String url, boolean cloak) throws IOException {
public Texture(String url, boolean cloak, Map<String, String> metadata) throws IOException {
this.url = IOHelper.verifyURL(url);
// Fetch texture
@ -37,20 +37,25 @@ public Texture(String url, boolean cloak) throws IOException {
}
// Get digest of texture
digest = SecurityHelper.digest(DIGEST_ALGO, new URL(url));
metadata = null; // May be auto-detect?
digest = SecurityHelper.digest(DIGEST_ALGO, texture);
this.metadata = metadata; // May be auto-detect?
}
public Texture(String url, Path local, boolean cloak) throws IOException {
public Texture(String url, Path local, boolean cloak, Map<String, String> metadata) throws IOException {
this.url = IOHelper.verifyURL(url);
byte[] texture;
try (InputStream input = IOHelper.newInput(local)) {
texture = IOHelper.read(input);
}
try (ByteArrayInputStream input = new ByteArrayInputStream(texture)) {
IOHelper.readTexture(input, cloak); // Verify texture
}
this.digest = SecurityHelper.digest(DIGEST_ALGO, local);
this.metadata = null;
this.digest = SecurityHelper.digest(DIGEST_ALGO, texture);
this.metadata = metadata;
}
@Deprecated
public Texture(String url, byte[] digest) {
this.url = IOHelper.verifyURL(url);
this.digest = digest == null ? new byte[0] : digest;

View file

@ -20,7 +20,6 @@ public final class JVMHelper {
public static final OperatingSystemMXBean OPERATING_SYSTEM_MXBEAN =
ManagementFactory.getOperatingSystemMXBean();
public static final OS OS_TYPE = OS.byName(OPERATING_SYSTEM_MXBEAN.getName());
@Deprecated
public static final int OS_BITS = getCorrectOSArch();
// System properties
public static final String OS_VERSION = OPERATING_SYSTEM_MXBEAN.getVersion();
@ -138,7 +137,6 @@ public static void checkStackTrace(Class<?> mainClass) {
}
}
@Deprecated
private static int getCorrectOSArch() {
// As always, mustdie must die
if (OS_TYPE == OS.MUSTDIE)
@ -152,7 +150,6 @@ public static String getEnvPropertyCaseSensitive(String name) {
return System.getenv().get(name);
}
@Deprecated
public static boolean isJVMMatchesSystemArch() {
return JVM_BITS == OS_BITS;
}

View file

@ -23,7 +23,6 @@ public final class JVMHelper {
// System properties
public static final String OS_VERSION = OPERATING_SYSTEM_MXBEAN.getVersion();
@Deprecated
public static final int OS_BITS = getCorrectOSArch();
public static final ARCH ARCH_TYPE = getArch(System.getProperty("os.arch"));
@ -131,7 +130,6 @@ public static void checkStackTrace(Class<?> mainClass) {
}
}
@Deprecated
private static int getCorrectOSArch() {
// As always, mustdie must die
if (OS_TYPE == OS.MUSTDIE)
@ -147,7 +145,6 @@ public static String getEnvPropertyCaseSensitive(String name) {
}
@Deprecated
public static boolean isJVMMatchesSystemArch() {
return JVM_BITS == OS_BITS;
}

@ -1 +1 @@
Subproject commit 19e9cf3d6ce7148db4374e3736862d52b5854638
Subproject commit fc263e19bc73cc7cb0f64c4e78c092c363b6769a

View file

@ -12,7 +12,7 @@
verBcpkix = '1.70'
verSlf4j = '1.7.36'
verLog4j = '2.19.0'
verMySQLConn = '8.0.32'
verMySQLConn = '8.0.33'
verPostgreSQLConn = '42.5.1'
verProguard = '7.3.1'
verLaunch4j = '3.50'