santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miha Vidmar <miha.vid...@hermes.si>
Subject RE: Java canonicalizer unrendered namespaces
Date Wed, 17 Aug 2005 16:07:27 GMT
When I was looking at the code, whenever n.rendered is set to true, the
n.lastrendered is set to whichever uri was just rendered. So just based on
that the data in lastrendered is wrong if it is set to "". That's what i
figured.

Unfortunatly I don't have the test case anymore, but i'll try to rewrite it
tomorrow.

Miha

-----Original Message-----
From: Raul Benito
To: security-dev@xml.apache.org
Sent: 8/17/05 5:31 PM
Subject: Re: Java canonicalizer unrendered namespaces

I need a test case, for this. I think I have a test case that
excercise this behaviour and it pass.
So can you send me a code that fails with this behaviour.

Thanks,

Raul
On 8/17/05, Miha Vidmar <miha.vidmar@hermes.si> wrote:
>  
> Hi, 
>   
> i'm using the latest released version of java security package and i
think i
> found a small problem in NameSpaceSymbTable.java function
getUnrenderedNodes
> (i checked the CVS version, it doesn't have this fixed). 
>   
> In case of the following: 
> <parent xmlns="http://www.w3.org/2000/09/xmldsig#"> 
> <Object id="test"><a xmlns=""></a></Object> 
> </parent> 
>   
> when canonicalizing test uri, the namespace in a is removed since it
is
> compared to an empty uri which is not set when getting rendering
parent
> namespaces. The following helped solved the problem (adding the
> n.lastrendered=n.uri line): 
>   
>  public  void getUnrenderedNodes(Collection result) {  
>     //List result=new ArrayList();
>     Iterator it=symb.entrySet().iterator();
>     while (it.hasNext()) {        
>       NameSpaceSymbEntry
> n=(NameSpaceSymbEntry)((Map.Entry)it.next()).getValue();
>       //put them rendered?
>       if ((!n.rendered) && (n.n!=null)) {
>        result.add(n.n);
>        n.lastrendered=n.uri;
>        n.rendered=true;
>       }
>     }    
>  } 
>   
>   
> ________________________________________ 
> Miha Vidmar 
> HERMES Softlab d.d., Ljubljana, Slovenija 
> Tel. +386 (0)1 586 52 00 
> Fax. +386 (0)1 586 52 70 
> mailto:miha.vidmar@hermes.si 
> http://www.hermes.si 
> ________________________________________ 
>   


-- 
http://r-bg.com

Mime
View raw message