1

Topic: Reporting parameters

Info for anyone developing Indicia reports.

To block a potential SQL injection attack risk, I've bumped up the sanitisation of all report parameters passed through to Indicia reports. This now means that the datatype of report parameters is used to sanitise parameter values, so you can't pass string data in number parameters etc. Although this particular change should not affect your reports, it does mean that it might break any reports which have the wrong datatype on their parameters (e.g. an integer datatype on what really should be a text parameter will now fail when passed something that is not a number).

There are also quite a few reports which accept a parameter to be used in an SQL in (...) filter, such as a list of taxon group IDs. In order that these should be sanitised properly, you will need to append [] to the datatype, e.g. integer[] or text[]. This tells the sanitiser to sanitise the elements in the list, not the entire list in one go.

I've reviewed all the reports in SVN, as well as any additional ones on the BRC live warehouse as best I can, but if you have other reports elsewhere then they might need to be reviewed.

Regards
John

John van Breda
Biodiverse IT

2

Re: Reporting parameters

John,

is this why our reporting grid on our website does not work? http://www.nbis.org.uk/reporting-grid

What do I need to change to fix this, is it is the form?

We are still having problems with our butterfly transects in our species surveillance forms.  Could you take a look?  Following an email I have had (will email you this), and other comments I have had from Martin.
All the forms are linked from here: http://www.nbis.org.uk/SpeciesSurveillanceForms

Thanks

Sam

Cheers

Sam