#799 Privacy list doesn't work when offline

Reporter Remko Tronçon
Owner Nobody
Stars ★ (1)  
  • Milestone-0.9
  • Priority-Medium
  • Type-Defect
  • Status-WontFix
  1. Remko Tronçon on

    What steps will reproduce the problem? 1. Put a (domain) JID on the privacy list as blocked 2. Log off 3. Receive message from blocked JID The message should be blocked, but it's delivered. The debug log says: Dec 15 09:12:56 s2sin10f4df0 debug Received[s2sin]: <message type='chat' to='me@el-tramo.be' from='876047022@lih.im/tjUdm6i'> Dec 15 09:12:56 el-tramo.be:privacy debug preCheckIncoming: Couldn't get session for jid: me@el-tramo.be/nil Running Prosody 0.9.11 on Debian.

  2. Zash on

    So the problem is that in preCheckIncoming (https://hg.prosody.im/0.9/file/8613086779fa/plugins/mod_privacy.lua#l389) if the stanza is directed to the bare JID, it'll look for the highest priority session and use the privacy list of that. Since there's no such session when the user is offline, it'll proceed with doing absolutely nothing, which lets the stanza through.

  3. Zash on

    It's highly unlikely that we'll be fixing mod_privacy. Recommend using mod_blocklist once 0.10 is done.

    • tags Milestone-0.9 Status-WontFix

New comment