Univention Bugzilla – Bug 51287
The UCR variable umc/self-service/passwordreset/token_validity_period is without function
Last modified: 2020-11-16 23:38:17 CET
The UCR variable umc/self-service/passwordreset/token_validity_period is not used in univention-self-service. The value is read from UCR but then not used. Instead the constant TOKEN_VALIDITY_TIME is used. sschwardt@dave:$ cd ~/git/ucs/management/univention-self-service sschwardt@dave:$ grep -Hr TOKEN_VALIDITY_TIME . ./umc/python/passwordreset/__init__.py:TOKEN_VALIDITY_TIME = 3600 ./umc/python/passwordreset/__init__.py: if (datetime.datetime.now() - token_from_db["timestamp"]).seconds >= TOKEN_VALIDITY_TIME: sschwardt@dave:$ grep -Hr token_validity_period . /debian/univention-self-service-passwordreset-umc.univention-config-registry-variables:[umc/self-service/passwordreset/token_validity_period] ./umc/python/passwordreset/__init__.py: self.token_validity_period = ucr_try_int("umc/self-service/passwordreset/token_validity_period", 3600) Untested workaround: sed -e 's/TOKEN_VALIDITY_TIME = 3600/TOKEN_VALIDITY_TIME = 86400/' \ /usr/lib/python2.7/dist-packages/univention/management/console/modules/passwordreset/__init__.py
To be sure about the consequences: due to this bug one can't configure how long a token for a password reset is actually valid?
(In reply to Ingo Steuwer from comment #1) > To be sure about the consequences: due to this bug one can't configure how > long a token for a password reset is actually valid? That is correct. The value is always 3600 seconds, albeit the UCRV is set differently.
Fixed in: univention-self-service.yaml a599710c8113 | YAML Bug #51287 univention-self-service (4.0.3-47) a817e4319058 | Bug #51287: evaluate UCR variable umc/self-service/passwordreset/token_validity_period Merged to UCS 5: univention-self-service (5.0.0-5) 8906f3575ddc | Bug #51287: evaluate UCR variable umc/self-service/passwordreset/token_validity_period
Token is invalid after $(ucr value) seconds: OK YAML: OK
<https://errata.software-univention.de/#/?erratum=4.4x777>