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,9 +79,12 @@ int guac_kubernetes_user_join_handler(guac_user* user, int argc, char** argv) {
/* Only handle events if not read-only */ /* Only handle events if not read-only */
if (!settings->read_only) { if (!settings->read_only) {
/* General mouse/keyboard/clipboard events */ /* General mouse/keyboard events */
user->key_handler = guac_kubernetes_user_key_handler; user->key_handler = guac_kubernetes_user_key_handler;
user->mouse_handler = guac_kubernetes_user_mouse_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; user->clipboard_handler = guac_kubernetes_clipboard_handler;
/* STDIN redirection */ /* STDIN redirection */

View File

@ -97,9 +97,12 @@ int guac_rdp_user_join_handler(guac_user* user, int argc, char** argv) {
/* Only handle events if not read-only */ /* Only handle events if not read-only */
if (!settings->read_only) { if (!settings->read_only) {
/* General mouse/keyboard/clipboard events */ /* General mouse/keyboard events */
user->mouse_handler = guac_rdp_user_mouse_handler; user->mouse_handler = guac_rdp_user_mouse_handler;
user->key_handler = guac_rdp_user_key_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; user->clipboard_handler = guac_rdp_clipboard_handler;
/* Display size change events */ /* Display size change events */

View File

@ -80,9 +80,12 @@ int guac_ssh_user_join_handler(guac_user* user, int argc, char** argv) {
/* Only handle events if not read-only */ /* Only handle events if not read-only */
if (!settings->read_only) { if (!settings->read_only) {
/* General mouse/keyboard/clipboard events */ /* General mouse/keyboard events */
user->key_handler = guac_ssh_user_key_handler; user->key_handler = guac_ssh_user_key_handler;
user->mouse_handler = guac_ssh_user_mouse_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; user->clipboard_handler = guac_ssh_clipboard_handler;
/* STDIN redirection */ /* STDIN redirection */

View File

@ -79,9 +79,12 @@ int guac_telnet_user_join_handler(guac_user* user, int argc, char** argv) {
/* Only handle events if not read-only */ /* Only handle events if not read-only */
if (!settings->read_only) { if (!settings->read_only) {
/* General mouse/keyboard/clipboard events */ /* General mouse/keyboard events */
user->key_handler = guac_telnet_user_key_handler; user->key_handler = guac_telnet_user_key_handler;
user->mouse_handler = guac_telnet_user_mouse_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; user->clipboard_handler = guac_telnet_clipboard_handler;
/* STDIN redirection */ /* STDIN redirection */

View File

@ -91,9 +91,12 @@ int guac_vnc_user_join_handler(guac_user* user, int argc, char** argv) {
/* Only handle events if not read-only */ /* Only handle events if not read-only */
if (!settings->read_only) { if (!settings->read_only) {
/* General mouse/keyboard/clipboard events */ /* General mouse/keyboard events */
user->mouse_handler = guac_vnc_user_mouse_handler; user->mouse_handler = guac_vnc_user_mouse_handler;
user->key_handler = guac_vnc_user_key_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; user->clipboard_handler = guac_vnc_clipboard_handler;
#ifdef ENABLE_COMMON_SSH #ifdef ENABLE_COMMON_SSH