summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoichiro IWAO <meta@vmeta.jp>2016-08-30 15:49:58 +0900
committerKoichiro IWAO <meta@vmeta.jp>2016-08-30 15:49:58 +0900
commit9f277e44457ab6027237c9b2a209f7092d904542 (patch)
treed3414b2b7649b3a22e123abb35d4d6fed8003573
parentb934e55fc84122b5fede9bb8fd91f631f5948895 (diff)
downloadxrdp-proprietary-9f277e44457ab6027237c9b2a209f7092d904542.tar.gz
xrdp-proprietary-9f277e44457ab6027237c9b2a209f7092d904542.zip
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.
-rw-r--r--sesman/chansrv/clipboard_file.c1
1 files changed, 1 insertions, 0 deletions
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))