RE: mod_perl 1.24_01 Cookie Problem..?? Was: Apache::AuthCookieDBI BEGIN problems...??

2001-01-05 Thread Geoffrey Young



> -Original Message-
> From: Jeff Sheffield [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 05, 2001 3:48 PM
> To: Jacob Davies
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; James Hall
> Subject: mod_perl 1.24_01 Cookie Problem..?? Was: 
> Apache::AuthCookieDBI
> BEGIN problems...??
> 
[snip]
> 
> >I looked through the guide and searched the maillist archive but did
> >not find much info to help with this.
> >I also tried to install Apache::AuthCookieDBI, but documentation is
> >very limited for that and never could get it right.
> and that got me to thinking maby this is a mod_perl  1.24_01 problem.
> because I am experiencing the same sort of thing.

not likely - I use 1.24_01 and Apache::AuthCookie without incident

try checking your headers manually as I suggested to James...

--Geoff

> 
> Jeff
> 



Re: Apache::AuthCookieDBI BEGIN problems...??

2001-01-04 Thread Jacob Davies

On Wed, Jan 03, 2001 at 12:02:15AM -0600, Jeff Sheffield wrote:
> I am ashamed ... I twitled with the shiny bits.
> my $auth_name = "WhatEver";
> $SECRET_KEYS{ $auth_name } = "thisishtesecretkeyforthisserver";
> ### END MY DIRTY HACK
> Note that without MY DIRTY LITTLE HACK it does not set those two
> variables. I am/was pretty sure that this somehow relates to
> "StackedHandlers"

I believe the problem is a known documentation bug with the module.  I need
to fix the docs and make a new release (have been meaning to for, oh,
five months now) but I no longer work at the place that originally paid
me to write the module and haven't had a chance so far.  I have a few other
patches to integrate too.  I believe your specific problem stems
from having the:

PerlModule Apache::AuthCookieDBI

line before the

PerlSetVar WhatEverDBI_SecretKeyFile /www/domain.com/test.key

line in the server config file.  Yes, the documentation has it the wrong
way around.  The reason is that the server reads this configuration
directive at module load time (i.e. with PerlModule, at server start time
when it's still running as root) so that it can preload the secret keys
from files on disk.  You want those files to be root-owned and only
readable by root, which is why it does it at start time.  Try putting
all your DBI_SecretKeyFile directives before the PerlModule line and
see if that fixes your problem.

It should give better diagnostics when this problem comes up, I need to
fix that.  Right now I don't even have this module running anywhere, but
I will install it again on my home machine at least, for testing.

Hopefully I will have a new release and an announce notice for this out
soon.

-- 
Jacob Davies
[EMAIL PROTECTED]



Re: Apache::AuthCookieDBI BEGIN problems...??

2001-01-02 Thread Jeff Sheffield

> ahh yes my config file is here for anyone who is intrested
oopse 
http://www.jspot.org/jeff/temp/custom.after


Thanks, 
Jeff

-
| Gender Diff's |
| THOUGHT FOR THE DAY: Any married man should forget his mistakes.  |
| There's no use in two people remembering the same thing.  |
|   |
|   --Anonymous |
-
| Jeff Sheffield|
| [EMAIL PROTECTED]|
| AIM=JeffShef  |
-



Apache::AuthCookieDBI BEGIN problems...??

2001-01-02 Thread Jeff Sheffield

Well been racking my brain against this one for awhile now..
so I figured that I would reach-out for some help ;)
First let me say
I am ashamed ... I twitled with the shiny bits.

the following code in the Apache::AuthCookieDBI module
does not work properly (for me).

-- code -- 
BEGIN {
my @keyfile_vars = grep {
   $_ =~ /DBI_SecretKeyFile$/ } keys %{ Apache->server->dir_config() };
   foreach my $keyfile_var ( @keyfile_vars ) {
   my $keyfile = Apache->server->dir_config( $keyfile_var );
   my $auth_name = $keyfile_var;
   $auth_name =~ s/DBI_SecretKeyFile$//;
   unless ( open( KEY, "<$keyfile" ) ) {
Apache::log_error( "Could not open keyfile for $auth_name in 
file $keyfile" );
} else {
$SECRET_KEYS{ $auth_name } = ;
close KEY;
}
   }
### MY DIRTY HACK
my $auth_name = "WhatEver";
$SECRET_KEYS{ $auth_name } = "thisishtesecretkeyforthisserver";
### END MY DIRTY HACK
}
-- end code --

Note that without MY DIRTY LITTLE HACK it does not set those two
variables. I am/was pretty sure that this somehow relates to
"StackedHandlers"
but
I built mod_perl statically with ALL_HOOKS=1 EVERYTHING=1
it is  Apache/1.3.14 (Unix) mod_perl/1.24_01 configured 

So after I set MY DIRTY LITTLE HACK. Things chug right along
i bind to the database I authenticate against the db.
until I/the module tries to set_cookie in the form 
Set-Cookie: 
Apache::AuthCookieDBI_WhatEver=jeff:2001-01-02-23-07-10:2001-01-02-23-12-10:2f8e147086c88e6771ac6751b5a1f25d;
path=/; domain=.jeff

So that makes me wonder if Date::Calc is installed correctly.
i.e. he module uses Date::Calc. also note that it installed fine.

I figured that the cookie problem could be a side effect of the 
firt problem I mentioned.

ahh yes my config file is here for anyone who is intrested

Any clue's..??

Thanks, 
Jeff

-
| Gender Diff's |
| THOUGHT FOR THE DAY: Any married man should forget his mistakes.  |
| There's no use in two people remembering the same thing.  |
|   |
|   --Anonymous |
-
| Jeff Sheffield|
| [EMAIL PROTECTED]|
| AIM=JeffShef  |
-