2024-03-31 01:46:50 +01:00
|
|
|
package app.revanced.patches.tumblr.fixes.fingerprints
|
|
|
|
|
|
|
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
|
|
|
import com.android.tools.smali.dexlib2.Opcode
|
|
|
|
|
2024-04-09 19:38:11 +02:00
|
|
|
// Fingerprint for the parseHttpMethodAndPath method from retrofit2
|
2024-03-31 01:46:50 +01:00
|
|
|
// https://github.com/square/retrofit/blob/ebf87b10997e2136af4d335276fa950221852c64/retrofit/src/main/java/retrofit2/RequestFactory.java#L270-L302
|
|
|
|
// Injecting here allows modifying the path/query params of API endpoints defined via annotations
|
2024-04-09 19:38:11 +02:00
|
|
|
internal object HttpPathParserFingerprint : MethodFingerprint(
|
2024-03-31 01:46:50 +01:00
|
|
|
strings = listOf("Only one HTTP method is allowed. Found: %s and %s."),
|
|
|
|
opcodes = listOf(
|
|
|
|
Opcode.IPUT_OBJECT,
|
2024-04-09 19:38:11 +02:00
|
|
|
Opcode.IPUT_BOOLEAN,
|
|
|
|
),
|
|
|
|
)
|