Bug 40790 - Problem mit Schaltjahr
Problem mit Schaltjahr
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.1
amd64 All
: P5 critical (vote)
: UCS 4.1-1-errata
Assigned To: Stefan Gohmann
Florian Best
:
: 40794 (view as bug list)
Depends on:
Blocks: 40791 40792
  Show dependency treegraph
 
Reported: 2016-02-29 07:55 CET by Dirk Siemer
Modified: 2016-03-17 13:20 CET (History)
6 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Siemer 2016-02-29 07:55:57 CET
Alle Versuche, mich am heutigen 29.2.2016 an der UMC anzumelden, scheitern mit einer durch das Anmeldefenster überdeckten Fehlermeldung. Das Logfile zum Modul "univention-management-console-web-server" gibt dazu folgendes preis:

29.02.16 07:46:02.139  MAIN        ( PROCESS ) : SessionClient(0x247ffd0): _authenticated: success=True  status=200  message=OK, operation successful
29.02.16 07:46:02.140  MAIN        ( ERROR   ) : Traceback in default((<__main__.CPAuth object at 0x2367410>,), {}):
Traceback (most recent call last):
  File "/usr/sbin/univention-management-console-web-server", line 74, in new_f
    return f(*args, **kwargs)
  File "/usr/sbin/univention-management-console-web-server", line 730, in default
    self.set_cookies(sessionid=response.body.get('sessionid'))
  File "/usr/sbin/univention-management-console-web-server", line 433, in set_cookies
    expiration = expiration.replace(year=expiration.year + 5)
ValueError: day is out of range for month

Das Problem tritt auch mit der Version 4.0.4 auf.
Comment 1 Stefan Gohmann univentionstaff 2016-02-29 08:08:07 CET
Please execute the following two commands:

sed -i 's|expires.year + 5)|expires.year + 4)|' /usr/sbin/univention-management-console-web-server

/etc/init.d/univention-management-console-web-server restart

Afterwards, a login should be possible again.
Comment 2 Stefan Gohmann univentionstaff 2016-02-29 08:12:59 CET
For UCS 3.2 and UCS 4.0 another command is needed:

sed -i 's|expiration.year + 5)|expiration.year + 4)|' /usr/sbin/univention-management-console-web-server


It is the best to execute the following three commands:

sed -i 's|expiration.year + 5)|expiration.year + 4)|' /usr/sbin/univention-management-console-web-server

sed -i 's|expires.year + 5)|expires.year + 4)|' /usr/sbin/univention-management-console-web-server

/etc/init.d/univention-management-console-web-server restart
Comment 3 Dirk Siemer 2016-02-29 08:18:07 CET
Das ging ja fix ... danke, es funktioniert wieder.
Comment 4 Stefan Gohmann univentionstaff 2016-02-29 08:20:21 CET
Please provide an erratum for 4.1-0 and 4.1-1.
Comment 5 Timo Denissen univentionstaff 2016-02-29 08:29:51 CET
Can confim the two sed's from Comment 2 to work in a UCS 3.2-8 environment.
Comment 6 Stefan Gohmann univentionstaff 2016-02-29 08:50:30 CET
I've fixed it for 4.1-1-errata / 4.1-0-errata, 4.0-4-errata and 3.2-8-errata.

4.1-1 commit: r67772
4.0-4 commit: r67773
3.2-8 commit: r67774

YAML files:
4.1-1: univention-management-console-frontend.yaml: r67776
4.0-4: univention-management-console-frontend.yaml: r67777
3.2-8: univention-management-console-frontend.yaml: r67778
Comment 7 Florian Best univentionstaff 2016-02-29 09:44:34 CET
OK: Problem has been reproduced and is fixed now. UMC can be used regularly after the fix.
OK: Code review
YAML: OK
Comment 8 Janek Walkenhorst univentionstaff 2016-02-29 10:51:37 CET
<http://errata.software-univention.de/ucs/4.1/122.html>
Comment 9 Florian Best univentionstaff 2016-02-29 11:09:34 CET
*** Bug 40794 has been marked as a duplicate of this bug. ***
Comment 10 Tobias Birkefeld univentionstaff 2016-03-01 11:24:17 CET
For the record:
The bug will occur again on 29.02.2096!
The year 2100 will be a common year and there won't be a day 29.02.2100.
Comment 11 Florian Best univentionstaff 2016-03-17 13:20:41 CET
This bug was caused by the changes in Bug #30318 / ucs-3.1-1 errata 50 / svn r39065.

(In reply to Tobias Birkefeld from comment #10)
> For the record:
> The bug will occur again on 29.02.2096!
> The year 2100 will be a common year and there won't be a day 29.02.2100.
Yes, created Bug #40914 for this.