1
난 그냥 5.0.1 레일 업그레이드, 그리고 보안 경고 실행 해요 :인수 오류 - 화이트리스트 및 안전 매개 변수를 전달 소독
<%= link_to "Title", params.merge(:utf8 => params[:utf8], :search => params[:search], :x => "5", :y => ""), title:"Alphabetical" %>
:
ArgumentError in Categories#show
Showing /home/user/website/app/views/categories/show.html.erb where line #127 raised:
Attempting to generate a URL from non-sanitized request parameters! An attacker
can inject malicious data into the generated URL, such as changing the host.
Whitelist and sanitize passed parameters to be secure.
이것은 잘못된 코드
이 오류를 검색하여 비슷한 문제가 발견되었지만 permit
(내 상황에서는 적용 할 수 없음) 대신 내 permit!
을 실행했거나 문제가 버그가 아니 었습니다. . 내 매개 변수에 html_safe
을 추가하려고 시도했지만 도움이되지 않았습니다.
누구든지 Rails 5 보안 조치를 준수하기 위해 매개 변수를 어떻게 위생 할 수 있는지 알고 있습니까?