rapid7/metasploit-framework — pull request #1293 by wchen-r7 (2013-01-11 22:32:16+00:00)
Title: Fix OptInt's valid?() function

[FixRM #7539] - The valid?() function will first normalize() the user-supplied input before validation. The problem is that the normalize() function will ALWAYS convert data to integer, therefore whatever you validate, you will always get true.

For example:
when I do "yomama".to_i, that returns 0, and of course will pass integer validation.

Ticket can be found here:
http://dev.metasploit.com/redmine/issues/7539