develooper Front page | perl.beginners | Postings from June 2003

CGI remote_user versus user_name

Thread Next
From:
Dan Muey
Date:
June 24, 2003 12:22
Subject:
CGI remote_user versus user_name
Message ID:
D6D77DB239A2004BB08A240E2E71460D12B76B@LSLOFFICE.infiniplex.infiniplex.com

CGI's remote_user()
rturns $ENV{'REMOTE_USER'};
While 
sub user_name {
    my ($self) = self_or_CGI(@_);
    return $self->http('from') || $ENV{'REMOTE_IDENT'} || $ENV{'REMOTE_USER'};
}

SO if I'm trying to get the login name I should use user_name since it will return REMOTE_USER or REMOTE_IDENT

My question is:

What is $self->http('from') ?
Is it possible/likely that $self->http('from') or REMOTE_IDENT will have a value that is not their authentication username while REMOTER_USER might be but it will never get to REMOTE_USER since one of the others are defined?

I ask because In Perl in aNutshell it's says user_name() is unreliable but doesn't say that about remote_user.


TIA

Dan

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About