Accept non-privileged IQs from XEP-0356 privileged components. #4341
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An MR to address #4336 (note: that hasn't been discussed yet, but it was a simple change so I figured I'd put up a PR for it anyway.)
mod_privilege current drops any non-privileged IQ received from a component with an error about it not being properly wrapped. While this might represent a mistake on the part of the component, it means that well- behaved components can no longer send non-privileged IQs (something they normally can do if mod_privilege isn't enabled).
Since mod_privilege is intended to grant additional permissions, and not remove existing ones, route non-privileged IQs received from the component normally, the same way we do with roster-query packets. The roster-query and privilege-iq checks are both last in get_iq_encapsulated_details(), so those checks don't bypass any other checks by short-circuiting; all we have to do is not drop the packet.