Bug 32329 - Missing cast in _unixTimeInverval2seconds
Missing cast in _unixTimeInverval2seconds
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Stefan Gohmann
Felix Botner
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-23 13:57 CEST by Stefan Gohmann
Modified: 2013-11-19 06:41 CET (History)
0 users

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
bug_32329_patch (804 bytes, patch)
2013-08-23 13:58 CEST, Stefan Gohmann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2013-08-23 13:57:47 CEST
The function _unixTimeInverval2seconds in dc.py does not cast the values from unicode to long. Thus the string is duplicated, e.g.:
  dc ucs_time: 101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010

instead of 600.
Comment 1 Stefan Gohmann univentionstaff 2013-08-23 13:58:46 CEST
Created attachment 5392 [details]
bug_32329_patch
Comment 2 Stefan Gohmann univentionstaff 2013-08-30 11:45:20 CEST
fixed

Code: r43569
Changelog: r43570
Comment 3 Felix Botner univentionstaff 2013-09-18 16:06:33 CEST
OK - 

-> python
>>> import univention.s4connector.s4.dc
>>> univention.s4connector.s4.dc._unixTimeInverval2seconds([1, "minutes"])
60L
>>> univention.s4connector.s4.dc._unixTimeInverval2seconds(["1", "minutes"])
60L

OK - Changelog
Comment 4 Stefan Gohmann univentionstaff 2013-11-19 06:41:25 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".