bug #4612 [security] XSS vulnerability in redirection mechanism

Signed-off-by: Marc Delisle <marc@infomarc.info>