Commit 919ed29b authored by Yadd's avatar Yadd
Browse files

Update to lemonldap-ng-07

parent 6eb6cbf0
Revision history for Perl extension Lemonldap::NG::Handler.
0.64 Sun Dec 17 14:54:14 2006
0.7 Tue Dec 19 19:09:09 2006
- config is now shared with Lemonldap::NG::Manager::Conf
- use Safe for locationRules and exportedHeaders 'eval'
0.63 Sun Dec 17 14:54:14 2006
- bug corrections
0.621 Tue Dec 5 20:12:12 2006
- move Handler.pod to Handler.pm to avoid CPAN bug
......
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Lemonldap-NG-Handler
version: 0.63
version: 0.7
version_from: lib/Lemonldap/NG/Handler.pm
installdirs: site
requires:
......@@ -9,6 +9,7 @@ requires:
Cache::Cache: 0
DBI: 0
Exporter: 0
Lemonldap::NG::Manager: 0.03
LWP::UserAgent: 0
MIME::Base64: 0
......
package My::Package;
use Lemonldap::NG::Handler::SharedConf::File;
@ISA = qw(Lemonldap::NG::Handler::SharedConf::File);
use Lemonldap::NG::Handler::SharedConf;
@ISA = qw(Lemonldap::NG::Handler::SharedConf);
__PACKAGE__->init ( {
localStorage => "Cache::FileCache",
......@@ -11,7 +11,7 @@ __PACKAGE__->init ( {
configStorage => {
type => 'File',
dirName => '__DIR__',
dirName => '__DIR__/conf',
},
https => 0,
......
#Listen 127.0.0.3:80
# On Apache2, uncomment this:
# PerlOptions +GlobalRequest
<VirtualHost 127.0.0.3:*>
ServerName test.example.com
PerlRequire __DIR__/MyHandler.pm
PerlRequire __DIR__/handler/MyHandler.pm
PerlInitHandler My::Package
<Location /reload>
Order deny,allow
......
package Lemonldap::NG::Handler;
print STDERR "See Lemonldap::NG::Handler(3) to know which Lemonldap::NG::Handler::* module to use.";
our $VERSION = "0.64";
our $VERSION = "0.7";
1;
......
......@@ -9,7 +9,7 @@ use Cache::Cache qw($EXPIRES_NEVER);
our @ISA = qw(Lemonldap::NG::Handler::Vhost Lemonldap::NG::Handler::Simple);
our $VERSION = '0.4';
our $VERSION = '0.5';
our $cfgNum = 0;
our $lastReload = 0;
our $reloadTime;
......
......@@ -14,7 +14,7 @@ BEGIN {
}
}
our $VERSION = '0.4';
our $VERSION = '0.5';
our @ISA = qw(Lemonldap::NG::Handler::SharedConf);
......
......@@ -4,8 +4,9 @@ use strict;
use MIME::Base64;
use Exporter 'import';
use Safe;
our $VERSION = '0.6';
our $VERSION = '0.7';
our %EXPORT_TAGS = (
localStorage => [
......@@ -17,7 +18,7 @@ our %EXPORT_TAGS = (
locationRules => [
qw(
$locationCondition $defaultCondition $locationCount
$locationRegexp $apacheRequest $datas
$locationRegexp $apacheRequest $datas $safe
)
],
import => [
......@@ -55,6 +56,7 @@ our (
$apacheRequest, $locationCount, $cookieName, $portal,
$datas, $globalStorage, $globalStorageOptions, $localStorage,
$localStorageOptions, $whatToTrace, $https, $refLocalStorage,
$safe,
);
##########################################
......@@ -184,11 +186,9 @@ sub lmSetErrHeaderOut {
sub lmSetHeaderOut {
my ( $r, $h, $v ) = @_;
if ( MP() == 2 ) {
print STDERR "DEBUG2 $h => $v\n";
return $r->headers_out->set( $h => $v );
}
else {
print STDERR "DEBUG1 $h => $v\n";
return $r->header_out( $h => $v );
}
}
......@@ -207,6 +207,10 @@ sub lmHeaderOut {
# Initialization subroutines #
##############################
# Security jail
$safe = new Safe;
$safe->share('&encode_base64','$datas');
# init() : by default, it calls localInit and globalInit, but with
# a shared configuration, init() is overloaded to call only
# localInit; globalInit is called later when the configuration
......@@ -302,7 +306,7 @@ sub conditionSub {
if ( $cond =~ /^deny$/i );
$cond =~ s/\$(\w+)/\$datas->{$1}/g;
my $sub;
eval '$sub = sub {return (' . $cond . ')}';
$sub = $safe->reval("sub {return ( $cond )}");
return $sub;
}
......@@ -357,9 +361,10 @@ sub forgeHeadersInit {
foreach ( keys %tmp ) {
$sub .= "lmSetHeaderIn(\$apacheRequest,'$_' => join('',split(/[\\r\\n]+/," . $tmp{$_} . ")));";
}
$sub = "\$forgeHeaders = sub {$sub};";
eval "$sub";
$class->lmLog( "$class: Unable to forge headers: $@ $sub", 'error' ) if ($@);
#$sub = "\$forgeHeaders = sub {$sub};";
#eval "$sub";
$forgeHeaders = $safe->reval("sub {$sub};");
$class->lmLog( "$class: Unable to forge headers: $@: sub {$sub}", 'error' ) if ($@);
}
################
......
......@@ -4,7 +4,7 @@ use Lemonldap::NG::Handler::Simple qw(:locationRules :headers);
use strict;
use MIME::Base64;
our $VERSION = '0.3';
our $VERSION = '0.4';
sub locationRulesInit {
my ( $class, $args ) = @_;
......@@ -43,9 +43,10 @@ sub forgeHeadersInit {
foreach ( keys %tmp ) {
$sub .= "lmSetHeaderIn(\$apacheRequest,'$_' => join('',split(/[\\r\\n]+/," . $tmp{$_} . ")));";
}
$sub = "\$forgeHeaders->{'$vhost'} = sub {$sub};";
eval "$sub";
$class->lmLog( "$class: Unable to forge headers: $@ $sub", 'error' ) if ($@);
#$sub = "\$forgeHeaders->{'$vhost'} = sub {$sub};";
#eval "$sub";
$forgeHeaders->{'$vhost'} = $safe->reval("sub {$sub}");
$class->lmLog( "$class: Unable to forge headers: $@: sub {$sub}", 'error' ) if ($@);
}
}
......
Changes
example/cgi.pl
example/imgs/_customers.gif
example/imgs/blank.gif
example/imgs/book.gif
example/imgs/book_titel.gif
example/imgs/books_close.gif
example/imgs/books_open.gif
example/imgs/btn_up1.gif
example/imgs/btn_up2.gif
example/imgs/close2.gif
example/imgs/folderClosed.gif
example/imgs/folderOpen.gif
example/imgs/iconCheckAll.gif
example/imgs/iconCheckGray.gif
example/imgs/iconClient.gif
example/imgs/iconDeleteSelected.gif
example/imgs/iconJob.gif
example/imgs/iconReport.gif
example/imgs/iconTask.gif
example/imgs/iconTimeRecordsEdit.gif
example/imgs/iconUnCheckAll.gif
example/imgs/item.gif
example/imgs/item2.gif
example/imgs/leaf.gif
example/imgs/line1.gif
example/imgs/line2.gif
example/imgs/line3.gif
example/imgs/line4.gif
example/imgs/magazines_close.gif
example/imgs/magazines_open.gif
example/imgs/minus.gif
example/imgs/minus2.gif
example/imgs/minus3.gif
example/imgs/minus4.gif
example/imgs/minus5.gif
example/imgs/minus_ar.gif
example/imgs/open2.gif
example/imgs/plus.gif
example/imgs/plus2.gif
example/imgs/plus3.gif
example/imgs/plus4.gif
example/imgs/plus5.gif
example/imgs/plus_ar.gif
example/imgs/tombs.gif
example/imgs/tombs_mag.gif
example/lemonldap-ng-manager.js
imgs/_customers.gif
imgs/blank.gif
imgs/book.gif
imgs/book_titel.gif
imgs/books_close.gif
imgs/books_open.gif
imgs/btn_up1.gif
imgs/btn_up2.gif
imgs/close2.gif
imgs/folderClosed.gif
imgs/folderOpen.gif
imgs/iconCheckAll.gif
imgs/iconCheckGray.gif
imgs/iconClient.gif
imgs/iconDeleteSelected.gif
imgs/iconJob.gif
imgs/iconReport.gif
imgs/iconTask.gif
imgs/iconTimeRecordsEdit.gif
imgs/iconUnCheckAll.gif
imgs/item.gif
imgs/item2.gif
imgs/leaf.gif
imgs/line1.gif
imgs/line2.gif
imgs/line3.gif
imgs/line4.gif
imgs/magazines_close.gif
imgs/magazines_open.gif
imgs/minus.gif
imgs/minus2.gif
imgs/minus3.gif
imgs/minus4.gif
imgs/minus5.gif
imgs/minus_ar.gif
imgs/open2.gif
imgs/plus.gif
imgs/plus2.gif
imgs/plus3.gif
imgs/plus4.gif
imgs/plus5.gif
imgs/plus_ar.gif
imgs/tombs.gif
imgs/tombs_mag.gif
example/index.pl
lemonldap-ng-manager.js
lib/Lemonldap/NG/Manager.pm
lib/Lemonldap/NG/Manager/Base.pm
......@@ -53,6 +53,6 @@ lib/Lemonldap/NG/Manager/Conf/DBI.pm
lib/Lemonldap/NG/Manager/Conf/File.pm
Makefile.PL
MANIFEST
META.yml Module meta-data (added by MakeMaker)
README
t/Lemonldap-NG-Manager.t
META.yml Module meta-data (added by MakeMaker)
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Lemonldap-NG-Manager
version: 0.03
version: 0.04
version_from: lib/Lemonldap/NG/Manager.pm
installdirs: site
requires:
......
This diff is collapsed.
......@@ -6,7 +6,7 @@ WriteMakefile(
VERSION_FROM => 'lib/Lemonldap/NG/Manager.pm', # finds $VERSION
PREREQ_PM => {
DBI => 0,
CGI => 0,
CGI => 3.08,
Storable => 0,
XML::Simple => 0
}, # e.g., Module::Name => 1.1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment