PurdueAgComm / Extension-2018

1 stars 1 forks source link

Sanitize County #2

Closed purduekenny closed 6 years ago

purduekenny commented 6 years ago

$county = $_GET['county']; //todo: sanitize (is there a known list of counties we can in_array against?)

List of counties can be found here: https://extension.purdue.edu/pages/countyoffices.aspx

sfp-john commented 6 years ago

Sanitizing the county is available with a new functions call. Tests are working well. The templates aren't using this GET param so it's not necessary at the moment (they are currently validated via the API call to get the home ID of the county), but available for future usage for possible performance improvements or double checking.

https://github.com/PurdueAgComm/Extension-2018/commit/999fd156449886e866f07498a6f5522c595e526a