Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: URL decode path to JAR containing spaces by osumatrix #233

Merged
merged 2 commits into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method
import crimera.patches.twitter.misc.integrations.fingerprints.ReVancedUtilsPatchesVersionFingerprint
import java.net.URLDecoder
import java.util.jar.JarFile

abstract class BaseIntegrationsPatch(
Expand Down Expand Up @@ -69,7 +70,7 @@ abstract class BaseIntegrationsPatch(

if (urlString.startsWith("jar:file:")) {
val end = urlString.indexOf('!')
return urlString.substring("jar:file:".length, end)
return URLDecoder.decode(urlString.substring("jar:file:".length, end), "UTF-8")
}
}
throw IllegalStateException("Not running from inside a JAR file.")
Expand Down Expand Up @@ -120,4 +121,4 @@ abstract class BaseIntegrationsPatch(
internal companion object {
internal const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/shared/Utils;"
}
}
}
Loading