http://www.perlmonks.org?node_id=262303


in reply to Re: hash collision DOS
in thread hash collision DOS

But doesn't CGI store fields internally as a hash?

From CGI 2.81:

sub param { my($self,@p) = self_or_default(@_); return $self->all_parameters unless @p; my($name,$value,@other); #~~~~~Snip~~~~~ ($name,$value,@other) = rearrange([NAME,[DEFAULT,VALUE,VALUES]],@p +); #~~~~~Snip~~~~~ return wantarray ? @{$self->{$name}} : $self->{$name}->[0]; }

It also looks like CGI::Simple does the same:

From CGI::Simple 0.06

sub param { my ( $self, $param, @p ) = @_; #~~~~~Snip~~~~~ return wantarray ? @{$self->{$param}} : $self->{$param}->[0]; }

How do I love -d? Let me count the ways...