Re: Security problem?

"Peter Millard" <me-STcBuFROdrv2eFz/[email protected]> Mon, 7 Feb 2005 10:45:06 -0700
Newsgroups gmane.network.jabber.exodus.user
Message-ID <003f01c50d3c$c2893d20$e201020a@pmillard2k>
Steven Millington wrote:
>> I'm looking at the Exodus client and have come across this problem.  If you
>> add someone to your roster, while they are still pending and have not been
>> accepted by the remote person you can still send them files and chat
>> requests.
>>
>> I'm looking for a way to find out if they have been accepted in
>> RosterWindow.pas
>>

Just to be clear, this is your interpretation of "security", but this is more of
a policy decision you would like to implement. You want to make changes to the
code to force folks to be subscribed before they can chat or send files?

What I'd recommend is that you change the global functions like StartChat() in
ChatWin.pas to enforce this. You'd want to fetch the TJabberRosteritem from the
main roster by doing:
        ritem = MainSession.Roster.Find(jid);
then checking the subscription on that roster item:
        if (ritem.subscription = 'to') or (ritem.subscription='both') then ....

Hope this helps.

pgm.