kids-first / kf-ui-data-tracker

👨‍⚕️ An application to collect study data and report on study status
https://data-tracker.kidsfirstdrc.org/
Apache License 2.0
1 stars 1 forks source link

Referral tokens are exchanged by wrong user #1136

Closed znatty22 closed 2 years ago

znatty22 commented 2 years ago

A referral token should only be claimed by a logged in user whose email matches the email in the referral token. Currently the code checks for a logged in user but does not verify whether the token is intended for that user. This results in referral tokens that get claimed by the sender rather than the intended recipient.

This error was never happening since exceptions caused by #1132 were masking this.