Can a Perl script return additional environment variables

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
andrekui
-


Joined: 15 Jul 2011
Posts: 1

PostPosted: Fri Jul 15, 2011 7:14 pm    Post subject: Can a Perl script return additional environment variables Reply with quote

Hi All,

Is it possible to let a perl cgi script return other than the standard environment variables?
Compared to Apache i miss the next env.vars:
QUERY_STRING
SERVER_ADDR
SERVER_ADMIN
SERVER_SIGNATURE

Thanks for any help.
Regards, Andre
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Mon Jul 18, 2011 6:52 pm    Post subject: Re: Can a Perl script return additional environment variable Reply with quote

andrekui wrote:
Hi All,

Is it possible to let a perl cgi script return other than the standard environment variables?
Compared to Apache i miss the next env.vars:
QUERY_STRING
SERVER_ADDR
SERVER_ADMIN
SERVER_SIGNATURE

Thanks for any help.
Regards, Andre


QUERY_STRING is available and exported to the CGI script (if there is query string in the URL) as explained in http://www.aprelium.com/data/doc/2/abyssws-win-doc-html/cgivars.html .

SERVER_ADDR is not standard and has no meaning in today's computers which are behind routers (SERVER_ADDR at best will have the LAN IP which is of no use).

SERVER_ADMIN and SERVER_SIGNATURE are also specific to Apache and configurable in it (so you can just feed the values to your script as you wish and fill them with the email of the site admin and the signature of the server).
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Toasty
-


Joined: 21 Feb 2008
Posts: 298
Location: Chicago, IL

PostPosted: Sun Aug 07, 2011 5:31 am    Post subject: Reply with quote

On the contrary, SERVER_ADDR is very, very valuable. Sure, it means the network that somebody is on, however if I had their local 192.168.x.x IP, it would be even less likely to help me.

I personally use SERVER_ADDR in nearly every page I write as a form of validating concurrency, alongside other techniques. Not flawless against proxies or users with a very low lease time on their IP address, however in most cases it helps improve security, and also gives a way to ban a user from the site, even if only temporarily.
_________________
Audit the secure configuration of your server headers!
Back to top View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Sat Aug 13, 2011 12:35 am    Post subject: Reply with quote

We'll add it to our new features list since it is not very complex to implement (but we still doubt about its efficiency especially behind routers.)

Toasty wrote:
however in most cases it helps improve security, and also gives a way to ban a user from the site, even if only temporarily.


It's the IP of the server. How can it help banning a user?
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group