Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Apply patch GoogleCloudPlatform#94 manually
Browse files Browse the repository at this point in the history
It looks like the mapreduce code doesn't properly validate filters of
list properties.

I don't know if this fix is right, but we can try it!

Implements GoogleCloudPlatform#94

Test plan:
Fingers crossed

Auditors: benkraft
  • Loading branch information
csilvers committed Jul 7, 2018
1 parent 6855464 commit 8df9b01
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/src/mapreduce/input_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,12 @@ def _validate_filters(cls, filters, model_class):
"Property %s is not defined for entity type %s",
prop, model_class.kind())

# Validate the value of each filter. We need to know filters have
if isinstance(properties[prop], db.ListProperty):
# for db.ListProperty validate expect a list, but filter expect
# a single value
val = [val]

# Validate the value of each filter. We need to know filters have
# valid value to carry out splits.
try:
properties[prop].validate(val)
Expand Down

0 comments on commit 8df9b01

Please sign in to comment.