Skip to content

Commit a5b4b9c

Browse files
committed
tunnel: add quotes around calling package
Judging by the previous check, this was clearly intended. Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent e744ce4 commit a5b4b9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tunnel/src/main/java/com/wireguard/android/util/RootShell.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public RootShell(final Context context) {
4646
final String packageName = context.getPackageName();
4747
if (packageName.contains("'"))
4848
throw new RuntimeException("Impossibly invalid package name contains a single quote");
49-
preamble = String.format("export CALLING_PACKAGE=%s PATH=\"%s:$PATH\" TMPDIR='%s'; magisk --sqlite \"UPDATE policies SET notification=0, logging=0 WHERE uid=%d\" >/dev/null 2>&1; id -u\n",
49+
preamble = String.format("export CALLING_PACKAGE='%s' PATH=\"%s:$PATH\" TMPDIR='%s'; magisk --sqlite \"UPDATE policies SET notification=0, logging=0 WHERE uid=%d\" >/dev/null 2>&1; id -u\n",
5050
packageName, localBinaryDir, localTemporaryDir, android.os.Process.myUid());
5151
}
5252

0 commit comments

Comments
 (0)