Management Console Login not possible - Leap Year

umc
login
leapyear

#1

It is possible, that the Login in the Management Console is not possible at the 29th of February (that is a “leap day”). In the management-console-log the following traceback appears (solution below):

29.02.16 00:42:31.533 MAIN ( PROCESS ) : SessionClient(0x4478f50):
_authenticated: success=True status=200 message=None
29.02.16 00:42:31.534 MAIN ( ERROR ) : Traceback (most recent call
last):
File “/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py”, line 656, in
respond
response.body = self.handler()
File “/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py”, line 188,
in call
self.body = self.oldhandler(*args, **kwargs)
File “/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py”, line 34, in
call
return self.callable(*self.args, **self.kwargs)
File “/usr/sbin/univention-management-console-web-server”, line 1010, in
default
return self._auth_request(req, sessionid)
File “/usr/sbin/univention-management-console-web-server”, line 1035, in
_auth_request
self.set_session(sessionid, username)
File “/usr/sbin/univention-management-console-web-server”, line 699, in
set_session
self.set_cookies((‘UMCSessionId’, sessionid), (‘UMCUsername’, username))
File “/usr/sbin/univention-management-console-web-server”, line 678, in
set_cookies
expires = expires.replace(year=expires.year + 5)
ValueError: day is out of range for month


There is an errataupdate released that fixes this behaviour. The errata are as follows:

UCS 3.2: 403

UCS 4.0: 403

UCS 4.1: 122

Solution via errataupdate (3.2):

# Login to your affected Server
ssh root@YOUR_AFFECTED_SERVER
# Update UCS to the newest Erratum (while staying in current minor version)
univention-upgrade --updateto=3.2-99

Solution via errataupdate (4.0):

# Login to your affected Server
ssh root@YOUR_AFFECTED_SERVER
# Update UCS to the newest Erratum (while staying in the current minor version)
univention-upgrade --updateto=4.0-99

Solution via errataupdate (4.1):

# Login to your affected Server
ssh root@YOUR_AFFECTED_SERVER
#Update UCS to the newest Erratum (while staying in the current minor version)
univention-upgrade --updateto=4.1-99

Workaround UCS 3.2 and 4.0 (without Update):

# Login to your affected Server
ssh root@YOUR_AFFECTED_SERVER
# Modify the univention-management-console-web-server
sed -i 's|expiration.year + 5)|expiration.year + 4)|' /usr/sbin/univention-management-console-web-server
# Restart Management Console
/etc/init.d/univention-management-console-web-server restart

Workaround UCS 4.1 (without Update):

# Login to your affected Server
ssh root@YOUR_AFFECTED_SERVER
# Modify the univention-management-console-web-server
sed -i 's|expires.year + 5)|expires.year + 4)|' /usr/sbin/univention-management-console-web-server
# Restart Management Console
/etc/init.d/univention-management-console-web-server restart