mpv2oboeru

mpv helpers to create flashcards from movies and TV shows
git clone anongit@rnpnr.xyz:mpv2oboeru.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 9c61f312cb59eb5ada832a32fb569ee522431036
Parent: ea670588efbbe2cefdbc993f0a025aeb63cca741
Author: Ren Tatsumoto
Date:   Fri,  5 Nov 2021 15:48:32 +0000

Merge pull request #57 from nbelikov/clipboard-fix

Fix automatic clipboard paste vulnerability
Diffstat:
Msubs2srs.lua | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/subs2srs.lua b/subs2srs.lua @@ -825,8 +825,8 @@ local function init_platform_windows() end self.copy_to_clipboard = function(text) - text = text:gsub("&", "^^^&"):gsub("[<>]", "") - mp.commandv("run", "cmd.exe", "/d", "/c", string.format("@echo off & chcp 65001 & echo %s|clip", text)) + text = text:gsub("&", "^^^&"):gsub("[<>|]", "") + mp.commandv("run", "cmd.exe", "/d", "/c", string.format("@echo off & chcp 65001 >null & echo %s|clip", text)) end self.curl_request = function(request_json, completion_fn)