litesaml / lightsaml

MIT License
82 stars 23 forks source link

Invalid validateNotBefore comparison #38

Open marcovo-peercode opened 1 year ago

marcovo-peercode commented 1 year ago

The Helper class ( https://github.com/litesaml/lightsaml/blob/master/src/LightSaml/Helper.php ) contains the following function:

public static function validateNotBefore($notBefore, $now, $allowedSecondsSkew)
{
    return null == $notBefore || (($notBefore - $allowedSecondsSkew) < $now);
}

I strongly suspect the < sign should be a <=? 'NotBefore' implies $now should be on-or-after $notBefore