geoext1 icon indicating copy to clipboard operation
geoext1 copied to clipboard

GeoExt.form.toFilter inserts wildcards for empty string field values

Open justb4 opened this issue 11 years ago • 0 comments

This issue was found in Heron (https://code.google.com/p/geoext-viewer/issues/detail?id=235) but applies to the function GeoExt.form.toFilter in

https://github.com/geoext/geoext/blob/master/lib/GeoExt/widgets/form.js

Problem is that in some forms with OR-ed fields where the user leaves fields empty and when wildcarding is enabled, the toFilter function will still add a wildcard to an empty string. In the worst case one may get the entire content of a DB. FIx is to skip filter encoding for fields with value is empty string and when wildcarding is one. We fixed this in Heron by overriding (also fixing other stuff), but may supply the fix as a pull as well. See fixed version here (line 267):

https://code.google.com/p/geoext-viewer/source/browse/trunk/heron/lib/override-geoext.js

justb4 avatar Jun 18 '13 16:06 justb4