Resolve bug reported by Mnkras through HackerOne.
https://hackerone.com/reports/5408