nette / security

🔑 Provides authentication, authorization and a role-based access control management via ACL (Access Control List)
https://doc.nette.org/access-control
Other
357 stars 40 forks source link

setExpiration: wrong argument type #70

Closed Lumeriol closed 2 years ago

Lumeriol commented 2 years ago

Version: 4.0.x-dev and lower

Bug Description

When I try to set User->setExpiration('30 minutes') with login form, there is type error in SessionStorage. Method setupExpiration() call $section->setExpiration() with local variable expireTime, that is typed as ?int, but first method argument must be ?string.

Possible Solution

Change code on line 98 to

$section->setExpiration((string)$this->expireTime, 'foo'); // time check

dg commented 2 years ago

fixed