Ticket #3408 (closed bug: fixed)

Opened 2 years ago

Last modified 23 months ago

OpenLayers.Util.getParameters deals with empty string incorrectly

Reported by: greid Owned by:
Priority: minor Milestone: 2.11 Release
Component: Util Version: 2.10
Keywords: Cc: gabriel.reid@…
State: Pullup

Description

The function OpenLayers.Util.getParameters is defined to use the window's current location for extracting parameters if the optional url parameter is not supplied. However, the check for the url parameter doesn't correctly deal with an empty string given as a parameter (which is something that I have experienced when this function is called by isEquivalentUrl via createUrlObject). The end result is that url parameters come out of nowhere and affect the URL object creation and url equivalency check.

This bug is present at least from 2.10 (but probably earlier) up to and including SVN revision 12167 (HEAD at the time of writing this).

Attachments

Util_getParameters_defaultParam.patch Download (1.7 KB) - added by greid 2 years ago.
Patch to correct handling of default value of url parameter to OpenLayers.Util.getParameters

Change History

Changed 2 years ago by greid

Patch to correct handling of default value of url parameter to OpenLayers.Util.getParameters

Changed 23 months ago by erilem

greid, do we have a CLA from you? Thanks.

Changed 23 months ago by greid

@erilem, yes, you've got a CLA from me (I just sent it in, sorry it slipped my mind at the time that I submitted this patch)

Changed 23 months ago by crschmidt

  • state set to Pullup

Changed 23 months ago by ahocevar

  • status changed from new to closed
  • resolution set to fixed

in 2.11-rc2

Changed 23 months ago by tschaub

 CLA received. Thanks.

Note: See TracTickets for help on using tickets.