AnsweredAssumed Answered

Unauthorized Subject Change is handled by ChangeSubjectListener

Question asked by Anno van Vliet on Aug 25, 2016
Latest reply on Mar 22, 2017 by Anno van Vliet

A user is sending a message to a room, trying to change the subject of a room, where he not is authorized to perform this action.

The server responds with a error in line with the message as specified in XEP-0045, Example 87:

<message
   
from='coven@chat.shakespeare.lit/thirdwitch'
   
id='lh2bs617'
   
to='hag66@shakespeare.lit/pda'
   
type='error'>
 
<subject>Fire Burn and Cauldron Bubble!</subject>
 
<error by='coven@chat.shakespeare.lit' type='auth'>
   
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
 
</error>
</message>

 

The SubjectListener still picks this message up as being a Subject change, while the filter lacks a filter on Error.

 

I fixed this locally by the following fix:

GitHub - annovanvliet/Smack at fixSubjectChange

Outcomes