diff --git a/sat/plugins/plugin_comp_file_sharing.py b/sat/plugins/plugin_comp_file_sharing.py index b2cdbb3c..2309fef1 100644 --- a/sat/plugins/plugin_comp_file_sharing.py +++ b/sat/plugins/plugin_comp_file_sharing.py @@ -508,6 +508,9 @@ class FileSharing: """This trigger accept file sending request, and store file locally""" if not client.is_component: return True, None + # client._file_sharing_allowed_hosts is set in plugin XEP-0329 + if peer_jid.host not in client._file_sharing_allowed_hosts: + raise error.StanzaError("forbidden") assert stream_object assert "stream_object" not in transfer_data assert C.KEY_PROGRESS_ID in file_data