You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andrew Hill <an...@gridnode.com> on 2004/07/09 18:20:07 UTC

[EVIL] Modifying a request parameter

String[] foo = request.getParameterValues("foo");
foo[2] = "you"; //Naughty naughty. Very naughty. Wicked! Absolutely
outrageous mate! ;->

In hindsight an odious but obvious and doubtlessly documented hack, yet Ive
spent four frustrating hours figuring out how my poor parameters were
getting maliciously murdered! This is a tale of tracing a thousand torturous
lines of config driven code and deep deep down in the dismal depths of their
convoluted bowels there lurks a menacing method that consumes string arrays
and does unspeakable things to them without allocating a new array
instance...


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org