[ic] discussion of patch for IC compatibility with NS 7

Mike Heins interchange-users@icdevgroup.org
Sat Sep 28 00:28:08 2002


Quoting Jeff Dafoe (jeff@badtz-maru.com):
> 
>     I propose that CGI::path_info be urldecoded in Server.pm but I am not
> sure what would be the appropriate place to do this.  I am thinking at the
> end of map_cgi .  If I am completely wrong on this correcting the Mozilla
> encoding of the colon and also eliminating the need to sprinkle the
> urldecode regex in Interpolate.pm let me know.

I don't understand this. What is getting tromped on?  And how would
you prevent a *real* sequence that meant what it said (%253a) from
being decoded improperly?

If it is one particular variable, You can do whatever you want with it.
Try defining a filter in Interpolate.pm:

    'urldecode' => sub {
			my $val = shift;
			$val =~ s|\%([a-fA-F0-9][a-fA-F0-9])|chr(hex($1))|eg;
			return $val;
		    },

Then in catalog.cfg, mandate that variable always be filtered:

	Filter foo urldecode

That works with this page:

    foo=[cgi foo]
    <p>
    [page href=@@MV_PAGE@@
	      form="
			    foo=colon:separated
	      "]Foo me with a colon, no double-encoding</A>
    <p>
    [page href=@@MV_PAGE@@
	      form="
			    foo=colon%253aseparated
	      "]Foo me with a double-encoded colon</A>

That I have never gotten around to defining a urldecode filter
over the years is pretty amazing, but I guess that means it is
rarely needed.

In any case, we wouldn't make a change in the core like that.
Mozilla works great for IC, and (unfortunately) it is a small
percentage of the market. When it grows in popularity, it will
be the non-buggy versions that do so. I remember running into that
bug, and that was *eons* ago at something like 0.8. Anyone who
runs a browser like that in this day and age must be used to lots
of weird results....

We would add another filter, though. 8-) In fact, it is already
in 4.9.3.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

My wife is great.  She doesn't care where I go, just as long as I don't
have any fun.  -- Lee Trevino