richter 00/01/06 00:33:00
Modified: . Changes.pod Embperl.pm Embperl.pod EmbperlD.pod
MANIFEST
emacs embperl.el
Log:
- added new mod_perl handler EmbperlObject, which helps to build whole
pages out of small objects, which can be overwritten in "derived"
pages.
- added EMBPERL_PATH (and path parameter to Execute), which can contain
a colon separated search path. Embperl uses it when a file, which does
not contain a path, is executed.
Revision Changes Path
1.98 +14 -0 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- Changes.pod 2000/01/05 07:27:26 1.97
+++ Changes.pod 2000/01/06 08:32:58 1.98
@@ -1,5 +1,19 @@
=pod
+=head1 1.3b1/1.3b2 -- That's what currently under developement
+
+ Last Update: <$localtime$> (MET)
+
+ NOTE: This version is only available via L<"CVS"|CVS/"INTRO">
+
+ - added new mod_perl handler EmbperlObject, which helps to build whole
+ pages out of small objects, which can be overwritten in "derived"
+ pages.
+ - added EMBPERL_PATH (and path parameter to Execute), which can contain
+ a colon separated search path. Embperl uses it when a file, which does
+ not contain a path, is executed.
+
+
=head1 1.2.1 5. Jan 2000
- fdat parameter of Execute function isn�t honoured when
1.77 +43 -11 embperl/Embperl.pm
Index: Embperl.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl.pm,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- Embperl.pm 2000/01/05 07:27:26 1.76
+++ Embperl.pm 2000/01/06 08:32:59 1.77
@@ -76,7 +76,7 @@
@ISA = qw(Exporter DynaLoader);
-$VERSION = '1.2.1';
+$VERSION = '1.3b2_dev';
# HTML::Embperl cannot be bootstrapped in nonlazy mode except
@@ -555,11 +555,11 @@
sub CheckFile
{
- my ($filename, $req_rec, $AllowZeroFilesize, $allow) = @_ ;
+ my ($filename, $req_rec, $AllowZeroFilesize, $allow, $path) = @_ ;
if (-d $filename)
{
- #logerror (rcIsDir, $filename, $req_rec);
+ #logerror (rcIsDir, $filename);
return &DECLINED ; # let Apache handle directories
}
@@ -569,21 +569,50 @@
return &FORBIDDEN ;
}
+ if (defined ($req_rec) && !($req_rec->allow_options & &OPT_EXECCGI))
+ {
+ logerror (rcExecCGIMissing, $filename);
+ return &FORBIDDEN ;
+ }
+
+ $path ||= $req_rec -> notes('EMBPERL_searchpath') if ($req_rec) ;
+ $path ||= $ENV{EMBPERL_PATH} ;
+
+ if ($path && !($filename =~ /\//))
+ {
+ my @path = split /:/, $path ;
+ my $fn = '' ;
+
+ foreach (@path)
+ {
+ next if (!$_) ;
+ $fn = "$_/$filename" ;
+ #warn "Embperl path search $fn\n" ;
+ if (-r $fn && (-s _ || $AllowZeroFilesize))
+ {
+ if (defined ($allow) && !($fn =~ /$allow/))
+ {
+ logerror (rcNotAllowed, $fn, $req_rec);
+ return &FORBIDDEN ;
+ }
+ $_[0] = $fn ;
+ return ok ;
+ }
+ }
+
+ -r $filename ;
+ }
+
unless (-r _ && (-s _ || $AllowZeroFilesize))
{
- logerror (rcNotFound, $filename, $req_rec);
+ logerror (rcNotFound, $filename);
return &NOT_FOUND ;
}
- if (defined ($req_rec) && !($req_rec->allow_options & &OPT_EXECCGI))
- {
- logerror (rcExecCGIMissing, $filename, $req_rec);
- return &FORBIDDEN ;
- }
-
return ok ;
}
+
##########################################################################################
sub ScanEnvironement
@@ -611,6 +640,7 @@
$$req{'debug'} = $ENV{EMBPERL_DEBUG} || 0 ;
$$req{'options'} = $ENV{EMBPERL_OPTIONS} || 0 ;
$$req{'log'} = $ENV{EMBPERL_LOG} || $DefaultLog ;
+ $$req{'path'} = $ENV{EMBPERL_PATH} || '' ;
if (defined($ENV{EMBPERL_ESCMODE}))
{ $$req{'escmode'} = $ENV{EMBPERL_ESCMODE} }
@@ -732,6 +762,8 @@
my $Inputfile = $$req{'inputfile'} || '?' ;
my $Sub = $$req{'sub'} || '' ;
+
+ $Inputfile = $req_rec -> notes ('EMBPERL_orgfilename') if ($req_rec &&
$Inputfile eq '*') ;
if (defined ($In))
{
@@ -740,7 +772,7 @@
}
elsif (!$Sub || $Inputfile ne '?')
{
- if ($rc = CheckFile ($Inputfile, $req_rec, (($$req{options} || 0) &
optAllowZeroFilesize), $$req{'allow'}))
+ if ($rc = CheckFile ($Inputfile, $req_rec, (($$req{options} || 0) &
optAllowZeroFilesize), $$req{'allow'}, $$req{path}))
{
FreeConfData ($conf) ;
return $rc ;
1.40 +14 -0 embperl/Embperl.pod
Index: Embperl.pod
===================================================================
RCS file: /home/cvs/embperl/Embperl.pod,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- Embperl.pod 2000/01/05 07:27:26 1.39
+++ Embperl.pod 2000/01/06 08:32:59 1.40
@@ -316,6 +316,14 @@
Same as L<"EMBPERL_VIRTLOG"> (see below). If B<virtlog> is equal to B<uri> the
logfile is sent.
+=item B<allow (1.2b10 and above)>
+
+Same as L<"EMBPERL_ALLOW"|"EMBPERL_ALLOW (only 1.2b10 and above)"> (see below)
+
+=item B<path (1.3b1 and above)>
+
+Same as L<"EMBPERL_PATH"|"EMBPERL_PATH (1.3b1 and above)"> (see below)
+
=item B<uri>
The URI of the request. Only needed for the virtlog feature.
@@ -461,6 +469,12 @@
If specified, only files which match the given B<perl regular expression> will be
processed by Embperl, all other files will return FORBIDDEN.
Especialy in a CGI environenemt this can be usefull to make a server more secure.
+
+=head2 EMBPERL_PATH (1.3b1 and above)
+
+Can contain a colon separated file search path. When a file is processed and the
filename
+does not contain a path, I<Embperl> searches all the specified directories for
+that file.
=head2 EMBPERL_COMPARTMENT
1.15 +14 -0 embperl/EmbperlD.pod
Index: EmbperlD.pod
===================================================================
RCS file: /home/cvs/embperl/EmbperlD.pod,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- EmbperlD.pod 2000/01/05 07:27:27 1.14
+++ EmbperlD.pod 2000/01/06 08:32:59 1.15
@@ -270,6 +270,14 @@
Wie L<"EMBPERL_VIRTLOG"> (siehe unten). Wenn B<virtlog> gleich B<uri> ist, wird
die Embperl Logdatei gesendet.
+=item B<allow (ab 1.2b10)>
+
+Wie L<"EMBPERL_ALLOW"|"EMBPERL_ALLOW (ab 1.2b10)"> (siehe unten)
+
+=item B<path (ab 1.3b1)>
+
+Wie L<"EMBPERL_PATH"|"EMBPERL_PATH (ab 1.3b1)"> (siehe unten)
+
=item B<uri>
Die URI des Request. Wird nur f�r Virtlog Feature ben�tigt.
@@ -412,6 +420,12 @@
B<Perl regular expression> entsprechen. Die Bearbeitung anderer Dateien wird mit
dem Fehlercode FORBIDDEN verweigert. Dies ist vorallem in CGI Mode n�tzlich, um
die Serversicherheit zu erh�hen.
+
+=head2 EMBPERL_PATH (ab 1.3b1)
+
+Hier kann eine durch Doppelpunkte getrennte Liste von Verzeichnissen angegeben
werden,
+die I<Embperl> durchsucht, wenn eine Datei verabeitet werden soll und die Datei
keine
+Pfadangaben enth�lt.
=head2 EMBPERL_COMPARTMENT
1.34 +1 -0 embperl/MANIFEST
Index: MANIFEST
===================================================================
RCS file: /home/cvs/embperl/MANIFEST,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- MANIFEST 1999/11/03 17:22:58 1.33
+++ MANIFEST 2000/01/06 08:32:59 1.34
@@ -1,6 +1,7 @@
Changes.pod
Embperl.pm
Embperl.xs
+EmbperlObject.pm
MANIFEST
Makefile.PL
README
1.69 +0 -0 embperl/emacs/embperl.el
Index: embperl.el
===================================================================
RCS file: /home/cvs/embperl/emacs/embperl.el,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- embperl.el 2000/01/05 07:27:27 1.68
+++ embperl.el 2000/01/06 08:33:00 1.69
@@ -19,9 +19,9 @@
;; Author : Erik Arneson ([EMAIL PROTECTED])
;; Created On : Wed Jul 22 17:16:39 PDT 1998
;; Last Modified By: Erik Arneson
-;; Last Modified On: $Date: 2000/01/05 07:27:27 $
+;; Last Modified On: $Date: 2000/01/06 08:33:00 $
;; Version : 1.00
-;; $Id: embperl.el,v 1.68 2000/01/05 07:27:27 richter Exp $
+;; $Id: embperl.el,v 1.69 2000/01/06 08:33:00 richter Exp $
;;
;; Please note that this software is very beta and rather broken. I
;; don't know how useful it will be, although I definitely plan on
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]