Commit c947f5e
committed
Do not assume ModSecurityIntervention argument to transaction::intervention has been initialized/cleaned
- Keep m_it->disruptive value and use it as return value to guarantee
that the value is correct.
- If m_it->disruptive is false and the 'it' argument has not been
initialized/cleaned, the function may incorrectly return a non-zero
value.
- When a disruptive intervention is being reported by the function,
defensively initialize log & url to NULL if there's no such data to
provide to the caller.
- If the caller has not initialized/cleaned those fields in the 'it'
argument, after returning from transaction::intervention, the user
can safely read the log & url fields and in all scenarios they'll
have valid values.1 parent 68d551c commit c947f5e
1 file changed
+21
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1469 | 1469 | | |
1470 | 1470 | | |
1471 | 1471 | | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
1472 | 1477 | | |
1473 | | - | |
| 1478 | + | |
1474 | 1479 | | |
1475 | 1480 | | |
1476 | 1481 | | |
1477 | 1482 | | |
1478 | 1483 | | |
| 1484 | + | |
1479 | 1485 | | |
1480 | 1486 | | |
1481 | 1487 | | |
| 1488 | + | |
| 1489 | + | |
1482 | 1490 | | |
1483 | 1491 | | |
1484 | 1492 | | |
| |||
1489 | 1497 | | |
1490 | 1498 | | |
1491 | 1499 | | |
| 1500 | + | |
| 1501 | + | |
1492 | 1502 | | |
1493 | 1503 | | |
1494 | 1504 | | |
1495 | 1505 | | |
1496 | | - | |
| 1506 | + | |
1497 | 1507 | | |
1498 | 1508 | | |
1499 | 1509 | | |
| |||
2260 | 2270 | | |
2261 | 2271 | | |
2262 | 2272 | | |
2263 | | - | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
2264 | 2277 | | |
2265 | | - | |
2266 | | - | |
2267 | | - | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
2268 | 2283 | | |
2269 | 2284 | | |
2270 | 2285 | | |
| |||
0 commit comments