fetlife/rollout

Rollout may break when a group with a | character in the name is activated for a feature with additional data

gstokkink opened this issue · 0 comments

To reproduce: define a group with a | character in its name, and activate the group for a feature that has some additional data. Next, check whether the feature is active. You will likely run into a JSON parsing exception.

The offending line:

raw_percentage, raw_users, raw_groups, raw_data = state.split('|', 4)

The | character in the group name causes garbage data to be assigned to the raw_data variable, which is subsequently parsed as JSON on line 18, resulting in the exception.

How to fix: I guess the group names should be serialized somehow. You could also disallow the | character in group names, I guess.