Skip to content

Commit 76ea061

Browse files
committed
Fix a bug
1 parent 2448143 commit 76ea061

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/submission_packager.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ def copy_tmc_langs(dest)
153153
end
154154

155155
def copy_extra_student_files(tmc_project_file, received, dest)
156-
tmc_project_file.extra_student_files.each do |rel_path|
156+
tmc_project_file.extra_student_files.each do |insecure_rel_path|
157+
rel_path = insecure_rel_path.tr("..", "")
157158
from = "#{received}/#{rel_path}"
158159
to = "#{dest}/#{rel_path}"
159160
next unless File.exist?(from)

0 commit comments

Comments
 (0)