Open redirect (ARCH6122)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key ruby.security.open-redirect · Severity warning · Category security · CWE CWE-601
Taking a redirect target from untrusted input without validation lets attackers phish users by redirecting them to malicious sites through a trusted domain.
Incorrect
Section titled “Incorrect”def login redirect_to params[:return_to]endCorrect
Section titled “Correct”def login redirect_to params[:return_to], allow_other_host: falseendRedirect only to relative paths or origins on an allowlist; do not permit external targets.