filter and hide run_command and test_command in websocket message
This commit is contained in:
@ -138,8 +138,10 @@ class SubmissionsController < ApplicationController
|
|||||||
if (/^exit/.match(message))
|
if (/^exit/.match(message))
|
||||||
kill_socket(tubesock)
|
kill_socket(tubesock)
|
||||||
else
|
else
|
||||||
# Filter out information about user and working directory
|
# Filter out information about run_command, test_command, user or working directory
|
||||||
if !(/root|workspace/.match(message))
|
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)
|
parse_message(message, 'stdout', tubesock)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user