(no-ticket) Use safe_redirect where necessary

Change-Id: If3667c84b34b3c468a9974805f4b8ce29fa748af