You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2018/05/27 16:33:07 UTC
[1/2] guacamole-server git commit: GUACAMOLE-564: Hide APC escape
sequence.
Repository: guacamole-server
Updated Branches:
refs/heads/master 81bba1b58 -> 526152b9c
GUACAMOLE-564: Hide APC escape sequence.
An APC escape sequence contains an arbitrary string command between
(ESC _) and (ESC \) sequences. While we don't support any APC commands, we
should ignore any commands that we do encounter.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/b96afce2
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/b96afce2
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/b96afce2
Branch: refs/heads/master
Commit: b96afce222dc8bc44d1f56dee2b314f1cfe09259
Parents: b61a6ab
Author: Jim Chen <nc...@mozilla.com>
Authored: Tue Jan 9 22:36:46 2018 -0500
Committer: Jim Chen <nc...@mozilla.com>
Committed: Sat May 26 23:25:56 2018 -0400
----------------------------------------------------------------------
src/terminal/terminal/terminal_handlers.h | 11 +++++++++++
src/terminal/terminal_handlers.c | 20 ++++++++++++++++++++
2 files changed, 31 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/b96afce2/src/terminal/terminal/terminal_handlers.h
----------------------------------------------------------------------
diff --git a/src/terminal/terminal/terminal_handlers.h b/src/terminal/terminal/terminal_handlers.h
index 0b2f9bb..6130d2c 100644
--- a/src/terminal/terminal/terminal_handlers.h
+++ b/src/terminal/terminal/terminal_handlers.h
@@ -186,5 +186,16 @@ int guac_terminal_osc(guac_terminal* term, unsigned char c);
*/
int guac_terminal_ctrl_func(guac_terminal* term, unsigned char c);
+/**
+ * Handles terminal control function sequences initiated with "ESC _".
+ *
+ * @param term
+ * The terminal that received the given character of data.
+ *
+ * @param c
+ * The character that was received by the given terminal.
+ */
+int guac_terminal_apc(guac_terminal* term, unsigned char c);
+
#endif
http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/b96afce2/src/terminal/terminal_handlers.c
----------------------------------------------------------------------
diff --git a/src/terminal/terminal_handlers.c b/src/terminal/terminal_handlers.c
index 02e9f9d..afbf20e 100644
--- a/src/terminal/terminal_handlers.c
+++ b/src/terminal/terminal_handlers.c
@@ -367,6 +367,10 @@ int guac_terminal_escape(guac_terminal* term, unsigned char c) {
guac_terminal_reset(term);
break;
+ case '_':
+ term->char_handler = guac_terminal_apc;
+ break;
+
default:
guac_client_log(term->client, GUAC_LOG_DEBUG,
"Unhandled ESC sequence: %c", c);
@@ -1373,3 +1377,19 @@ int guac_terminal_ctrl_func(guac_terminal* term, unsigned char c) {
}
+int guac_terminal_apc(guac_terminal* term, unsigned char c) {
+
+ /* xterm does not implement APC functions and neither do we. Look for the
+ * "ESC \" (string terminator) sequence, while ignoring other chars. */
+ static bool escaping = false;
+
+ if (escaping) {
+ if (c == '\\')
+ term->char_handler = guac_terminal_echo;
+ escaping = false;
+ }
+
+ if (c == 0x1B)
+ escaping = true;
+ return 0;
+}
[2/2] guacamole-server git commit: GUACAMOLE-564: Merge changes
ignoring APC sequences within Guacamole's terminal emulator.
Posted by mj...@apache.org.
GUACAMOLE-564: Merge changes ignoring APC sequences within Guacamole's terminal emulator.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/526152b9
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/526152b9
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/526152b9
Branch: refs/heads/master
Commit: 526152b9c6efc731a940cf5ee7f9f32c93973c3d
Parents: 81bba1b b96afce
Author: Michael Jumper <mj...@apache.org>
Authored: Sun May 27 09:31:35 2018 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Sun May 27 09:31:35 2018 -0700
----------------------------------------------------------------------
src/terminal/terminal/terminal_handlers.h | 11 +++++++++++
src/terminal/terminal_handlers.c | 20 ++++++++++++++++++++
2 files changed, 31 insertions(+)
----------------------------------------------------------------------