Skip to content

Commit 42a5de9

Browse files
committed
fix(Boost for Reddit - Spoof client): Fix account login by removing user agent patch
1 parent d90786e commit 42a5de9

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

api/revanced-patches.api

-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ public final class app/revanced/patches/reddit/customclients/baconreader/api/Spo
418418
public final class app/revanced/patches/reddit/customclients/boostforreddit/api/SpoofClientPatch : app/revanced/patches/reddit/customclients/AbstractSpoofClientPatch {
419419
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/boostforreddit/api/SpoofClientPatch;
420420
public fun patchClientId (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
421-
public fun patchUserAgent (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
422421
}
423422

424423
public final class app/revanced/patches/reddit/customclients/infinityforreddit/api/SpoofClientPatch : app/revanced/patches/reddit/customclients/AbstractSpoofClientPatch {

src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/api/SpoofClientPatch.kt

-17
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import app.revanced.patcher.data.BytecodeContext
44
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
55
import app.revanced.patcher.fingerprint.MethodFingerprintResult
66
import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
7-
import app.revanced.patches.reddit.customclients.Constants.OAUTH_USER_AGENT
87
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint
98
import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.LoginActivityOnCreateFingerprint
109

@@ -25,20 +24,4 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
2524
"""
2625
)
2726
}
28-
29-
override fun Set<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) {
30-
first().let { result ->
31-
result.mutableMethod.apply {
32-
val insertIndex = result.scanResult.patternScanResult!!.endIndex
33-
34-
addInstructions(
35-
insertIndex,
36-
"""
37-
const-string v7, "$OAUTH_USER_AGENT"
38-
invoke-virtual {v4, v7}, Landroid/webkit/WebSettings;->setUserAgentString(Ljava/lang/String;)V
39-
"""
40-
)
41-
}
42-
}
43-
}
4427
}

0 commit comments

Comments
 (0)