The tr/// does nothing. This:
tr/[^\w\/\.\-\?\=\&\@\%]//
does nothing. When there's no right side, and no flags, the left side is copied
to the right side, and thus we've got a mapping of % to itself, w to itself, and so on.
Which brings up the second problem. You seem to be treating it like a s///,
rather than a tr///, and they share only the slashes. {grin}
There's no "character classes" in tr///, nor do the square brackets mean
what you think they mean, nor does the \w mean anything other than backslash
followed by the letter w.
As for the "external redirect" issue, dws and tilly helped me determine that CGI.pm now in fact (in violation of the spec) sends both a Status-302 and a Location
header to the server, which the server error-corrects by turning an internal redirect into a fully-qualified external redirect. Ewww. This is sooooo broken, and was therefore unexpected when I posted my first note.
So, you're safe, but only because others have padded the hallways for you, and only because everybody is error-correcting for you. {grin}
-- Randal L. Schwartz, Perl hacker | [reply] [d/l] |
So what I really needed to do was change the tr/// into an s/// construct. I didn't realize that tr wasn't interpolated like s is. Hmm.
With regards to the second issue, how would you modify the code to send a correctly formatted redirect? Would you manually print(); the "Status" and "Location" headers, or is there some other way I don't know about?
A newly-shaven initiate thanks you...
Signature void where prohibited by law.
| [reply] |