Mailing List Archive

bugs in SSI.pm
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 : $ENV{REQUEST_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.
TBD

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.

-mda

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org