perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark D. Anderson" <>
Subject bugs in
Date Mon, 02 Apr 2007 21:15:30 GMT
1. Only sets DOCUMENT_URI in mod_perl.
Fix: change in InitSSI to have:
     $ENV{DOCUMENT_URI}  = $Embperl::req->apache_req ? $Embperl::req->apache_req->uri

2. Assumes that SSI expressions are perl compatible. They aren't.
Fix: insert into InterpretVars
    $val =~ s,!=\s*/,!~ /,;
    $val =~ s,=\s*/,=~ /,;
    $val =~ s/!=/ne/;
    $val =~ s/=([^~])/eq$1/;
This of course is not safe in quoted strings. Alternatively, this could
be done:
    my @fields = ($val =~ m/\s* ("(?:(?!(?<!\\)").)*" | '(?:(?!(?<!\\)').)*' | +\S+)/gx;
    $val = join(' ', map {m/^[\"\']/ ? $_ : map_ssi_ops_to_perl($_)} @fields;

3. Does not url decode the value of #fsize virtual, #include virtual, or #exec cgi
TBD; Requires fixes in subs exec, include, fsize.

4. Does not relativize "file" and "virtual" to the current document, 
as mod_include dictates (for #fsize, #include, and #exec).
Instead it seems to just be using cwd.

5. Improperly sticks an extra slash into an absolute #include virtual.
Fix: should be $ENV{DOCUMENT_ROOT} . "$filename"; not $ENV{DOCUMENT_ROOT} . "/$filename";
though really i don't know why find_file() isn't being used.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message