mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 08:35:37 -04:00
(1/?) Move Session ID filter
This commit is contained in:
parent
20d7fa383a
commit
2af8f54687
@ -109,9 +109,8 @@ public class JREUtils
|
||||
jreReleaseReader.close();
|
||||
return jreReleaseMap;
|
||||
}
|
||||
|
||||
private static boolean checkAccessTokenLeak = true;
|
||||
public static void redirectAndPrintJRELog(final LoggableActivity act, final String accessToken) {
|
||||
|
||||
public static void redirectAndPrintJRELog(final LoggableActivity act) {
|
||||
Log.v("jrelog","Log starts here");
|
||||
JREUtils.logToActivity(act);
|
||||
Thread t = new Thread(new Runnable(){
|
||||
@ -143,16 +142,6 @@ public class JREUtils
|
||||
int len;
|
||||
while ((len = p.getInputStream().read(buf)) != -1) {
|
||||
String currStr = new String(buf, 0, len);
|
||||
|
||||
// Avoid leaking access token to log by replace it.
|
||||
// Also, Minecraft will just print it once.
|
||||
if (checkAccessTokenLeak) {
|
||||
if (accessToken != null && accessToken.length() > 5 && currStr.contains(accessToken)) {
|
||||
checkAccessTokenLeak = false;
|
||||
currStr = currStr.replace(accessToken, "ACCESS_TOKEN_HIDDEN");
|
||||
}
|
||||
}
|
||||
|
||||
act.appendToLog(currStr);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user