From 56f2cc221a970b67e666e762630ff287a1b802e8 Mon Sep 17 00:00:00 2001 From: Ralf Teusner Date: Fri, 25 Sep 2015 12:53:45 +0200 Subject: [PATCH] filter and hide run_command and test_command in websocket message --- app/controllers/submissions_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/submissions_controller.rb b/app/controllers/submissions_controller.rb index b7940ed9..a1a804f1 100644 --- a/app/controllers/submissions_controller.rb +++ b/app/controllers/submissions_controller.rb @@ -138,8 +138,10 @@ class SubmissionsController < ApplicationController if (/^exit/.match(message)) kill_socket(tubesock) else - # Filter out information about user and working directory - if !(/root|workspace/.match(message)) + # Filter out information about run_command, test_command, user or working directory + run_command = @submission.execution_environment.run_command + test_command = @submission.execution_environment.test_command + if !(/root|workspace|#{run_command}|#{test_command}/.match(message)) parse_message(message, 'stdout', tubesock) end end