Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
SECURITY: remove sensitive user content from submissions export
Dieser Commit ist enthalten in:
Ursprung
b45e01803d
Commit
0a450d58f4
1 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
|
@ -22,7 +22,12 @@ class CustomWizard::AdminSubmissionsController < CustomWizard::AdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
def download
|
def download
|
||||||
send_data submission_list.submissions.to_json,
|
content = ActiveModel::ArraySerializer.new(
|
||||||
|
submission_list.submissions,
|
||||||
|
each_serializer: CustomWizard::SubmissionSerializer
|
||||||
|
)
|
||||||
|
|
||||||
|
send_data content.to_json,
|
||||||
filename: "#{Discourse.current_hostname}-wizard-submissions-#{@wizard.name}.json",
|
filename: "#{Discourse.current_hostname}-wizard-submissions-#{@wizard.name}.json",
|
||||||
content_type: "application/json",
|
content_type: "application/json",
|
||||||
disposition: "attachment"
|
disposition: "attachment"
|
||||||
|
|
Laden …
In neuem Issue referenzieren