Pull Request: Scrub personal data from questions response
Changes Made
Wrapped response from question.getQuestionsUserCreatedOrForecastedOnOrIsSharedWith with a scrubber function. There may be more places this needs to be applied to, but this should remove emails and other personal data from anything that uses the Questions component.
Testing
Tested locally that responses on the public predictions page now return null for emails and some other fields.
Risks
There may be other responses that need to be scrubbed in a similar way. This is also intended as a quick fix for the immediate issue - but for reducing the risk of this happening again in future, I think we should consider having clearer models of what we need in the response from the DB.
Pull Request: Scrub personal data from questions response
Changes Made
question.getQuestionsUserCreatedOrForecastedOnOrIsSharedWith
with a scrubber function. There may be more places this needs to be applied to, but this should remove emails and other personal data from anything that uses the Questions component.Testing
Tested locally that responses on the public predictions page now return null for emails and some other fields.
Risks
There may be other responses that need to be scrubbed in a similar way. This is also intended as a quick fix for the immediate issue - but for reducing the risk of this happening again in future, I think we should consider having clearer models of what we need in the response from the DB.