fixed ssfs
This commit is contained in:
@@ -2,6 +2,10 @@ package ru.vtosters.lite.utils;
|
||||
|
||||
import android.util.Base64;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/*
|
||||
*Extension of Base64 class for decoding/encoding with flag NO_PADDING
|
||||
*/
|
||||
@@ -14,4 +18,12 @@ public class Base64Utils {
|
||||
public static String encode(String base) {
|
||||
return Base64.encodeToString(base.getBytes(), Base64.NO_PADDING);
|
||||
}
|
||||
|
||||
public static String encodeValue(String value) {
|
||||
try {
|
||||
return URLEncoder.encode(value, StandardCharsets.UTF_8.toString());
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class SSFSUtils {
|
||||
"&lang=" + getLocale() +
|
||||
"&vt=1&vksans=" + isVKSansEnabled() +
|
||||
"&vt_version=" + getBuildNumber() +
|
||||
"&useragent=" + Base64Utils.encode(Network.l.c().a()) +
|
||||
"&useragent=" + Base64Utils.encodeValue(Base64Utils.encode(Network.l.c().a()) +
|
||||
"&vt_debug=" + isDEVModEnabled();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user