  this.complete = function (result) {
    if (resultsBuffer.length) {
      socket.emit('result', resultsBuffer)
      resultsBuffer = []
    }

    socket.emit('complete', result || {})
    if (this.config.clearContext) {
      navigateContextTo('about:blank')
    } else {
      self.updater.updateTestStatus('complete')
    }
    if (returnUrl) {
      if (!/^https?:\/\//.test(returnUrl)) {
        throw new Error(
          'Security: Navigation to '.concat(
            returnUrl,
            ' was blocked to prevent malicious exploits.'
          )
        )
      }
      location.href = returnUrl
    }
  }
A web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a Redirect. This simplifies phishing attacks.