Search Changesets

MantisBT: master-1.3.x 6c95495c

2016-10-16 05:47

cproensa


Details Diff
Prevent db errors for invalid bug/bugnote ids

Some db engines may throw an error if provided with an integer out of
the supported range for field type. As an example: pgsql.
This can happen when the user provides a number high enough as input in
several places. For example:
- Bug and bugnote linking, in texts that are processed by core formatting
plugin
- Bug jump quick access
- Bug id provided for a relation

The core formatting case is especially bad, because the bug page cannot
be rendered, always ending in a db error.

The fix is applied in bug_exists(), and bugnote_exists() functions,
which should fix most of said situations all through the applcation.

Fixes: 0021802
Affected Issues
0021802
mod - core/bug_api.php Diff File
mod - core/bugnote_api.php Diff File
mod - core/constant_inc.php Diff File
mod - core/string_api.php Diff File