Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$ENV{'REMOTE_USER'} variable

Status
Not open for further replies.

imad77

Instructor
Oct 18, 2008
97
CA
Hi,

I want to add a Logout button in my Web application, this application is in Perl/CGI, the user have to connect to an LDAP server with his credentials.

I'm looking a way to reset the value of this variable, because it contains his credentials:

$ENV{'REMOTE_USER'}

Is it a way to reset this variable? or quit the application?

Thanks,

Imad
 
how do you mean reset?

can you not simply use
Code:
$ENV{'REMOTE_USER'} = "";

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
I tried it before and I added exit(), but the user can use Previous button of IE and return back to last window and can continue to work with the first login id.

Is it a way to flush the IE content to avoid to return back?

thanks
 
For the "Is it a way to flush the IE content to avoid to return back?", what I have done is:

Use CGI::Session and in you main page header can be set to expire=>now. Upon submit pass session to target and delete it or update DB with status change.

If they go back, they should see a new page (dependeing on how they have their browser set up), but even if try to submit with OLD data, the session or cookie timer has expired and they will get an error message.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top