From 7f3e7df505db3e3468a468872ff2cd5bcccf1f3d Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Wed, 19 Oct 2016 18:19:38 -0400 Subject: [PATCH] Add boundary.rect to geo_autocomplete sanitizer --- sanitizer/_geo_autocomplete.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sanitizer/_geo_autocomplete.js b/sanitizer/_geo_autocomplete.js index 04fc0b0d..45c2f921 100644 --- a/sanitizer/_geo_autocomplete.js +++ b/sanitizer/_geo_autocomplete.js @@ -1,5 +1,6 @@ var geo_common = require ('./_geo_common'); var LAT_LON_IS_REQUIRED = false; +var RECT_IS_REQUIRED = false; // validate inputs, convert types and apply defaults module.exports = function sanitize( raw, clean ){ @@ -9,6 +10,7 @@ module.exports = function sanitize( raw, clean ){ try { geo_common.sanitize_point( 'focus.point', clean, raw, LAT_LON_IS_REQUIRED ); + geo_common.sanitize_rect( 'boundary.rect', clean, raw, RECT_IS_REQUIRED ); } catch (err) { messages.errors.push( err.message );