SMF icon indicating copy to clipboard operation
SMF copied to clipboard

Login2() illogical statement

Open jasonclemons opened this issue 11 years ago • 0 comments

As per: http://www.simplemachines.org/community/index.php?topic=538793.0

Line 182: LogInOut.php

    elseif (!empty($_POST['cookielength']) && ($_POST['cookielength'] >= 1 || $_POST['cookielength'] <= 525600))
        $modSettings['cookieTime'] = (int) $_POST['cookielength'];

The part that doesn't make sense is this:

($_POST['cookielength'] >= 1 || $_POST['cookielength'] <= 525600)

as that part of the statement will always return true. My guess is that the operator should be && not ||, but it does require some further investigation.

jasonclemons avatar Aug 11 '15 06:08 jasonclemons