[Android] Remote access: enforce playback control setting on subtitle upload
Nicolas Pomepuy
git at videolan.org
Wed Sep 9 06:43:36 UTC 2026
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Sep 3 14:41:26 2026 +0200| [43170792fc10611f003c9a79b4cdbb78075df72b] | committer: Duncan McNamara
Remote access: enforce playback control setting on subtitle upload
> https://code.videolan.org/videolan/vlc-android/commit/43170792fc10611f003c9a79b4cdbb78075df72b
---
.../java/org/videolan/vlc/remoteaccessserver/RemoteAccessRouting.kt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessRouting.kt b/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessRouting.kt
index 7df905a810..3a53728f97 100644
--- a/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessRouting.kt
+++ b/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessRouting.kt
@@ -99,6 +99,7 @@ import org.videolan.tools.REMOTE_ACCESS_FILE_BROWSER_CONTENT
import org.videolan.tools.REMOTE_ACCESS_HISTORY_CONTENT
import org.videolan.tools.REMOTE_ACCESS_LOGS
import org.videolan.tools.REMOTE_ACCESS_NETWORK_BROWSER_CONTENT
+import org.videolan.tools.REMOTE_ACCESS_PLAYBACK_CONTROL
import org.videolan.tools.Settings
import org.videolan.tools.awaitAppIsForegroung
import org.videolan.tools.getContextWithLocale
@@ -253,6 +254,10 @@ fun Route.setupRouting(appContext: Context, scope: CoroutineScope) {
// Upload a subtitle to the device
post("/upload-subtitle") {
verifyLogin(settings)
+ if (!settings.getBoolean(REMOTE_ACCESS_PLAYBACK_CONTROL, true)) {
+ call.respond(HttpStatusCode.Forbidden)
+ return at post
+ }
var fileName: String
val multipartData = call.receiveMultipart()
More information about the Android
mailing list