GUACAMOLE-381: Disable inbound clipboard transfer if "disable-paste" is set.

This commit is contained in:
Michael Jumper 2019-02-19 11:40:32 -08:00
parent 7d2b7126db
commit 993d5c5707
5 changed files with 35 additions and 20 deletions

View File

@ -79,10 +79,13 @@ int guac_kubernetes_user_join_handler(guac_user* user, int argc, char** argv) {
/* Only handle events if not read-only */
if (!settings->read_only) {
/* General mouse/keyboard/clipboard events */
user->key_handler = guac_kubernetes_user_key_handler;
user->mouse_handler = guac_kubernetes_user_mouse_handler;
user->clipboard_handler = guac_kubernetes_clipboard_handler;
/* General mouse/keyboard events */
user->key_handler = guac_kubernetes_user_key_handler;
user->mouse_handler = guac_kubernetes_user_mouse_handler;
/* Inbound (client to server) clipboard transfer */
if (!settings->disable_paste)
user->clipboard_handler = guac_kubernetes_clipboard_handler;
/* STDIN redirection */
user->pipe_handler = guac_kubernetes_pipe_handler;

View File

@ -97,10 +97,13 @@ int guac_rdp_user_join_handler(guac_user* user, int argc, char** argv) {
/* Only handle events if not read-only */
if (!settings->read_only) {
/* General mouse/keyboard/clipboard events */
user->mouse_handler = guac_rdp_user_mouse_handler;
user->key_handler = guac_rdp_user_key_handler;
user->clipboard_handler = guac_rdp_clipboard_handler;
/* General mouse/keyboard events */
user->mouse_handler = guac_rdp_user_mouse_handler;
user->key_handler = guac_rdp_user_key_handler;
/* Inbound (client to server) clipboard transfer */
if (!settings->disable_paste)
user->clipboard_handler = guac_rdp_clipboard_handler;
/* Display size change events */
user->size_handler = guac_rdp_user_size_handler;

View File

@ -80,10 +80,13 @@ int guac_ssh_user_join_handler(guac_user* user, int argc, char** argv) {
/* Only handle events if not read-only */
if (!settings->read_only) {
/* General mouse/keyboard/clipboard events */
user->key_handler = guac_ssh_user_key_handler;
user->mouse_handler = guac_ssh_user_mouse_handler;
user->clipboard_handler = guac_ssh_clipboard_handler;
/* General mouse/keyboard events */
user->key_handler = guac_ssh_user_key_handler;
user->mouse_handler = guac_ssh_user_mouse_handler;
/* Inbound (client to server) clipboard transfer */
if (!settings->disable_paste)
user->clipboard_handler = guac_ssh_clipboard_handler;
/* STDIN redirection */
user->pipe_handler = guac_ssh_pipe_handler;

View File

@ -79,10 +79,13 @@ int guac_telnet_user_join_handler(guac_user* user, int argc, char** argv) {
/* Only handle events if not read-only */
if (!settings->read_only) {
/* General mouse/keyboard/clipboard events */
user->key_handler = guac_telnet_user_key_handler;
user->mouse_handler = guac_telnet_user_mouse_handler;
user->clipboard_handler = guac_telnet_clipboard_handler;
/* General mouse/keyboard events */
user->key_handler = guac_telnet_user_key_handler;
user->mouse_handler = guac_telnet_user_mouse_handler;
/* Inbound (client to server) clipboard transfer */
if (!settings->disable_paste)
user->clipboard_handler = guac_telnet_clipboard_handler;
/* STDIN redirection */
user->pipe_handler = guac_telnet_pipe_handler;

View File

@ -91,10 +91,13 @@ int guac_vnc_user_join_handler(guac_user* user, int argc, char** argv) {
/* Only handle events if not read-only */
if (!settings->read_only) {
/* General mouse/keyboard/clipboard events */
user->mouse_handler = guac_vnc_user_mouse_handler;
user->key_handler = guac_vnc_user_key_handler;
user->clipboard_handler = guac_vnc_clipboard_handler;
/* General mouse/keyboard events */
user->mouse_handler = guac_vnc_user_mouse_handler;
user->key_handler = guac_vnc_user_key_handler;
/* Inbound (client to server) clipboard transfer */
if (!settings->disable_paste)
user->clipboard_handler = guac_vnc_clipboard_handler;
#ifdef ENABLE_COMMON_SSH
/* Set generic (non-filesystem) file upload handler */