Make sure that the Env macro cannot be used to access objects or data references.

This commit is contained in:
Colin Kuskie 2012-02-11 14:15:53 -08:00
parent c76f12d278
commit 2f15d87377
3 changed files with 16 additions and 10 deletions

View file

@ -25,7 +25,8 @@ Macro for displaying fields from the Session env hash.
=head3 key
The key from the Session env hash to display. If the key doesn't exist,
then undef will be returned.
then the empty string will be returned. This does not allow objects or data references
in the env hash to be accessed.
=cut
@ -33,7 +34,7 @@ then undef will be returned.
sub process {
my $session = shift;
my $key = shift;
return $session->request->env->{$key};
return $session->request->env->{$key}.'';
}
1;