[#1419] Fix open redirect

This fixes #1419