filter and hide run_command and test_command in websocket message

This commit is contained in:
Ralf Teusner
2015-09-25 12:53:45 +02:00
parent 3657fe3e93
commit 56f2cc221a

View File

@ -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