mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Fondermann <bf_...@brainlounge.de>
Subject Re: svn commit: r791261 - /mina/sandbox/vysper/trunk/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubCreateNodeHandler.java
Date Tue, 07 Jul 2009 09:21:18 GMT
mjakl@apache.org wrote:
> Author: mjakl
> Date: Sun Jul  5 15:42:12 2009
> New Revision: 791261
> 
> URL: http://svn.apache.org/viewvc?rev=791261&view=rev
> Log:
> Don't trust the sender with the "to" address, use the one in the sessionContext.

Now _you_ are getting overly defensive. ;-)

If my mind serves me right, the to address has been checked before (in
ProtocolWorker?), so it's save to use it. And I don't think
getServerJID() will neccessarily give you the right one in every case
either.

  Bernd


> 
> Modified:
>     mina/sandbox/vysper/trunk/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubCreateNodeHandler.java
> 
> Modified: mina/sandbox/vysper/trunk/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubCreateNodeHandler.java
> URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubCreateNodeHandler.java?rev=791261&r1=791260&r2=791261&view=diff
> ==============================================================================
> --- mina/sandbox/vysper/trunk/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubCreateNodeHandler.java
(original)
> +++ mina/sandbox/vysper/trunk/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubCreateNodeHandler.java
Sun Jul  5 15:42:12 2009
> @@ -66,7 +66,7 @@
>              ServerRuntimeContext serverRuntimeContext,
>              SessionContext sessionContext) {
>          Entity sender = getFromAddress(stanza, sessionContext);
> -        Entity receiver = stanza.getTo();
> +        Entity receiver = sessionContext.getServerJID();
>  
>          String iqStanzaID = stanza.getAttributeValue("id");
>  
> 
> 
> 


Mime
View raw message