OfficeLinebacker has asked for the wisdom of the Perl Monks concerning the following question:
I have a very basic security set up for a web-based system I wrote that uses a .htaccess file and is (obviously) hosted on Linux. It has just one line Require statement: Require valid-user. My .htpasswd file has one entry, which contains the credentials needed to access the system. So far, so good. However, one of the CGI scripts actually sends a POST message to one of the other CGI scripts. When I initailly set up the system, I had no security, and naively thought I could just add .htaccess/.htpassword security and be done with it. Well, this request from one CGI script to the other no longer works, and the error I get is '401 Unauthorized.'
So I know I could just append the un/pw data to the post, but I am wondering if there is a "better way" to do this. Add another user to the .htpasswd file? My understanding of this is rudimentary at best.
Thanks.Edit: Adding credentials to the LWP::UserAgent did not do the trick. I used $ua->credentials( $netloc, $realm, $uname, $pass ) with domain.com:80, "Some Realm," and the user name and password, and I am still getting 401. Help!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Best practice for letting my CGI scripts access another password protected CGI script?
by Anonymous Monk on Oct 29, 2013 at 01:00 UTC | |
by OfficeLinebacker (Chaplain) on Oct 29, 2013 at 23:56 UTC | |
by Anonymous Monk on Oct 30, 2013 at 00:55 UTC | |
Re: Best practice for letting my CGI scripts access another password protected CGI script?
by OfficeLinebacker (Chaplain) on Oct 30, 2013 at 00:27 UTC | |
by Anonymous Monk on Oct 30, 2013 at 01:02 UTC |