Skip to content

Commit 5d5a300

Browse files
committed
Anydbm back end didn't list creator or actor as protected properties.
1 parent d17fe45 commit 5d5a300

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ Fixed:
115115
- Make all links created with rel=nofollow include noopener. Deals
116116
with possible hijack of original page due to malicious link target.
117117
https://mathiasbynens.github.io/rel-noopener/ (John Rouillard)
118+
- Fix bug where some protected properties were not identified as such
119+
when using the anydbm backend (John Rouillard)
118120

119121
2018-07-13 1.6.0
120122

roundup/backends/back_anydbm.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,11 @@ def create_inner(self, **propvalues):
908908
if self.db.journaltag is None:
909909
raise hyperdb.DatabaseError(_('Database open read-only'))
910910

911-
if 'creation' in propvalues or 'activity' in propvalues:
912-
raise KeyError('"creation" and "activity" are reserved')
911+
912+
if ('creator' in propvalues or 'actor' in propvalues or
913+
'creation' in propvalues or 'activity' in propvalues):
914+
raise KeyError('"creator", "actor", "creation" and '
915+
'"activity" are reserved')
913916
# new node's id
914917
newid = self.db.newid(self.classname)
915918

@@ -1184,8 +1187,10 @@ def set_inner(self, nodeid, **propvalues):
11841187
if not propvalues:
11851188
return propvalues
11861189

1187-
if 'creation' in propvalues or 'activity' in propvalues:
1188-
raise KeyError('"creation" and "activity" are reserved')
1190+
if ('creator' in propvalues or 'actor' in propvalues or
1191+
'creation' in propvalues or 'activity' in propvalues):
1192+
raise KeyError('"creator", "actor", "creation" and '
1193+
'"activity" are reserved')
11891194

11901195
if 'id' in propvalues:
11911196
raise KeyError('"id" is reserved')

0 commit comments

Comments
 (0)