GUACAMOLE-381: Disable inbound clipboard transfer if "disable-paste" is set.
This commit is contained in:
parent
7d2b7126db
commit
993d5c5707
@ -79,10 +79,13 @@ 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;
|
||||||
user->clipboard_handler = guac_kubernetes_clipboard_handler;
|
|
||||||
|
/* Inbound (client to server) clipboard transfer */
|
||||||
|
if (!settings->disable_paste)
|
||||||
|
user->clipboard_handler = guac_kubernetes_clipboard_handler;
|
||||||
|
|
||||||
/* STDIN redirection */
|
/* STDIN redirection */
|
||||||
user->pipe_handler = guac_kubernetes_pipe_handler;
|
user->pipe_handler = guac_kubernetes_pipe_handler;
|
||||||
|
@ -97,10 +97,13 @@ 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;
|
||||||
user->clipboard_handler = guac_rdp_clipboard_handler;
|
|
||||||
|
/* Inbound (client to server) clipboard transfer */
|
||||||
|
if (!settings->disable_paste)
|
||||||
|
user->clipboard_handler = guac_rdp_clipboard_handler;
|
||||||
|
|
||||||
/* Display size change events */
|
/* Display size change events */
|
||||||
user->size_handler = guac_rdp_user_size_handler;
|
user->size_handler = guac_rdp_user_size_handler;
|
||||||
|
@ -80,10 +80,13 @@ 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;
|
||||||
user->clipboard_handler = guac_ssh_clipboard_handler;
|
|
||||||
|
/* Inbound (client to server) clipboard transfer */
|
||||||
|
if (!settings->disable_paste)
|
||||||
|
user->clipboard_handler = guac_ssh_clipboard_handler;
|
||||||
|
|
||||||
/* STDIN redirection */
|
/* STDIN redirection */
|
||||||
user->pipe_handler = guac_ssh_pipe_handler;
|
user->pipe_handler = guac_ssh_pipe_handler;
|
||||||
|
@ -79,10 +79,13 @@ 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;
|
||||||
user->clipboard_handler = guac_telnet_clipboard_handler;
|
|
||||||
|
/* Inbound (client to server) clipboard transfer */
|
||||||
|
if (!settings->disable_paste)
|
||||||
|
user->clipboard_handler = guac_telnet_clipboard_handler;
|
||||||
|
|
||||||
/* STDIN redirection */
|
/* STDIN redirection */
|
||||||
user->pipe_handler = guac_telnet_pipe_handler;
|
user->pipe_handler = guac_telnet_pipe_handler;
|
||||||
|
@ -91,10 +91,13 @@ 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;
|
||||||
user->clipboard_handler = guac_vnc_clipboard_handler;
|
|
||||||
|
/* Inbound (client to server) clipboard transfer */
|
||||||
|
if (!settings->disable_paste)
|
||||||
|
user->clipboard_handler = guac_vnc_clipboard_handler;
|
||||||
|
|
||||||
#ifdef ENABLE_COMMON_SSH
|
#ifdef ENABLE_COMMON_SSH
|
||||||
/* Set generic (non-filesystem) file upload handler */
|
/* Set generic (non-filesystem) file upload handler */
|
||||||
|
Loading…
Reference in New Issue
Block a user