Skip to content

Files

Latest commit

 

History

History
15 lines (8 loc) · 530 Bytes

CheckDivideByZero.md

File metadata and controls

15 lines (8 loc) · 530 Bytes

Pattern: Division by zero

Issue: -

Description

Integer division by zero (0) in Ruby results in a ZeroDivisionError exception.

While not strictly a security issue, if an attacker can trigger a large number of exceptions it can harm site availability.

Brakeman warns when it finds potential division by zero with integers. Dividing a float by zero or 0.0 in Ruby results in Infinity, not an exception.

Further Reading