From 9f277e44457ab6027237c9b2a209f7092d904542 Mon Sep 17 00:00:00 2001 From: Koichiro IWAO Date: Tue, 30 Aug 2016 15:49:58 +0900 Subject: [PATCH] chansrv: pathname also should be URL decoded because 1st argument to clipboard_get_file() is given as URL encoded. Decoding only filename is incomplete. Without this fix, clipboard file doesn't work in case pathname contains non-ASCII characters or non-alphanumeric ASCII characters. --- sesman/chansrv/clipboard_file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sesman/chansrv/clipboard_file.c b/sesman/chansrv/clipboard_file.c index 8c2f2189..194a2cf4 100644 --- a/sesman/chansrv/clipboard_file.c +++ b/sesman/chansrv/clipboard_file.c @@ -200,6 +200,7 @@ clipboard_get_file(char* file, int bytes) } g_memcpy(filename, file + pindex + 1, (bytes - 1) - pindex); /* this should replace %20 with space */ + clipboard_check_file(pathname); clipboard_check_file(filename); g_snprintf(full_fn, 255, "%s/%s", pathname, filename); if (g_directory_exist(full_fn))