Skip to content

Commit 3edbc91

Browse files
author
Richard Jones
committed
timelog editing via csv interface crashes [SF#699837]
this needs a better approach :) we've needed a generic string-to-hyperdb-type converter since day one...
1 parent 46275f1 commit 3edbc91

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ are given with the most recent entry first.
66
- Query editing now works correctly (sf bug 621248)
77
- roundup-server now logs IP addresses by default (sf bug 778795)
88
- logfile must be specified if pidfile is (sf bug 772820)
9+
- timelog editing via csv interface crashes (sf bug 699837)
10+
911

1012
2003-07-29 0.6.0b4
1113
- plugged cross-site-scripting hole (thanks Jeff Epler)

roundup/cgi/client.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.128 2003-08-10 13:38:43 jlgijsbers Exp $
1+
# $Id: client.py,v 1.129 2003-08-12 01:26:08 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -1272,6 +1272,16 @@ def editCSVAction(self):
12721272
# if it's a multilink, split it
12731273
if isinstance(prop, hyperdb.Multilink):
12741274
value = value.split(':')
1275+
elif isinstance(prop, hyperdb.Password):
1276+
value = password.Password(value)
1277+
elif isinstance(prop, hyperdb.Interval):
1278+
value = date.Interval(value)
1279+
elif isinstance(prop, hyperdb.Date):
1280+
value = date.Date(value)
1281+
elif isinstance(prop, hyperdb.Boolean):
1282+
value = value.lower() in ('yes', 'true', 'on', '1')
1283+
elif isinstance(prop, hyperdb.Number):
1284+
value = float(value)
12751285
d[name] = value
12761286
elif exists:
12771287
# nuke the existing value

0 commit comments

Comments
 (0)