On Thursday 06 May 2010 20:40:03 Spencer Jackson wrote: > Hi guys, just wanted to touch base. Anyway, I'm working on resolving bug > number 3571( https://bugs.freenetproject.org/view.php?id=3571 ). To > summarize, the filter tends to reorder attributes at semirandom when > they get parsed. While the structure which holds the parsed attribute is > a LinkedHashMap, meaning we should be able to stuff in values and pull > them out in the same order, the put functions are called in the derived > verifier's overrided sanitizeHash methods. These methods extract an > attribute, sanitize it, then place it in the Map. The problem is, they > are extracted out of the original order, meaning they get pulled out of > the Map in the wrong order. To fix this, I created a callback object > which the derived classes pass to the baseclass. The baseclass may then > parse all of the attributes in order, invoking the callback to > sanitize.If an attribute's contents fails to be processed, an exception > may be thrown, so that the attribute will not be included in the final > tag.
It is important that only attributes that are explicitly parsed and understood are passed on, and that it doesn't take extra per-sanitiser work to achieve this. Will this be the case? > I have a git branch open here: > http://github.com/spencerjackson/fred-staging/tree/HTMLAttributeOrder > > On a related note, I noticed that the exceptions thrown inside of the > Content Filter seem to be very HTML oriented. Perhaps these should be > reworked? I could do it either later, or while I'm moving the filters up > to the client layer. Probably a good idea. > > Comments and thoughts are very much appreciated. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20100507/eace5fe2/attachment.pgp>
