Apache2-AuthEnv

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - Use Memoize to cache the database file lookup, to speed access
          on subsequence requests.

1.3.7 March 2011
        - Set verion number to v1.3.7 as this allows CPAN to update the
          module correctly.
	- Incorporate Apache2::ServerRec::warn for logging.
        - Add AuthEnvLogDebug directive for debugging.
        - Restrict AuthEnvUser and AuthEnvVar to directory, location and
          .htaccess files only.
	- Deal with taint checks.
	- No longer need "PerlOptions +GlobalRequest" in perl.conf

1.3.6 March 2011
        - Fix bug that disallowed directives to be specified in
          httpd.conf files. Reported by John Ostuni, Giovanni Torres,
          NIH/NINDS)

	- Allow fixed user names but still issue warning.

1.3.5 January 2011

lib/Apache2/AuthEnv.pm  view on Meta::CPAN

	my $line = join(':', $parms->directive->filename, $parms->directive->line_num);

	# Check file is valid - i.e. exists and readable.
	unless ( -r $db )
	{
		#warn "DB file is '$db'.\n";
		warn "Cannot read database file at $line.\n";
		return 0;
	}

	# Untaint as file exists.
	$db = $1 if ($db =~ /^(.*)$/);

	push @{$cfg->{set}}, ['dbimport', $var, $db, $fmt, $line];
}

sub AuthEnvSet
{
	my ($cfg, $parms, $var, $fmt) = @_;
	my $line = join(':', $parms->directive->filename, $parms->directive->line_num);
	push @{$cfg->{set}}, ['set', $var, $fmt, $line];

lib/Apache2/AuthEnv.pm  view on Meta::CPAN

		-Filename => $file, 
		-Flags => DB_RDONLY,
	;

	unless ($db)
	{
		err("Cannot read database '$file' failed ($!) ");
		return $null;
	}

	# Side step any taint issues.
	# The datbase is a valid file.
	$db->RemoveTaint(1);

	# Return nothing if there is no entry.
	return $null unless exists $data{$var};

	# Return frozen data.
	freeze $data{$var};
}



( run in 0.368 second using v1.01-cache-2.11-cpan-4e96b696675 )