[Clipart] upload script suggestion

Jonadab the Unsightly One jonadab at bright.net
Mon Mar 21 16:25:23 PST 2005


"Stephen Silver" <ocalocal at btinternet.com> writes:

>     <metadata/>

D'OH.

I'll have to be marginally more clever with that regex.
A fix that theoretically should solve this is in place now.
And if further changes are needed, the input logging will help.

> The only correct thing to do here is to use an XML parser.  

If we have to, we have to, but I suspect it's not necessary.  I can
certainly fix it so it doesn't match tags that end in />, much more
easily than walking an XML tree.  (A tag could theoretically have
right brokets inside quoted attribute data, causing it to not be
stripped out, but I suspect that the tags in question will not, in
practice.)

>> The input logging I've put in place now should help us diagnose it.
>
> That was quick!  

The hard part of it (getting away from CGI::Lite to a more flexible
solution for form input) was already done.  The actual logging is a
very small change.  (With CGI::Lite the actual logging would have been
a very large change, or impossible, but with what is in place now it
was very easy.)

Incidentally, the input is currently logged in
/srv/clipart.freedesktop.org/upload.log
Although that can be changed in the configuration (or the logging can
be turned off, by removing that line from the config file entirely).

-- 
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,"ten.thgirb\@badanoj$/ --";$\=$ ;-> ();print$/




More information about the clipart mailing list