SECURITY: Disallow symlinks when restoring uploads.

This commit is contained in:
Guo Xiang Tan 2017-03-17 14:27:01 +08:00
parent c14d98354b
commit 2daed01070

View File

@ -380,7 +380,7 @@ module BackupRestore
current_db_name = RailsMultisite::ConnectionManagement.current_db current_db_name = RailsMultisite::ConnectionManagement.current_db
execute_command( execute_command(
'rsync', '-avp', "#{tmp_uploads_path}/", "uploads/#{current_db_name}/", 'rsync', '-avp', '--safe-links', "#{tmp_uploads_path}/", "uploads/#{current_db_name}/",
failure_message: "Failed to restore uploads." failure_message: "Failed to restore uploads."
) )