Skip to content

Files

Latest commit

 

History

History
8 lines (5 loc) · 436 Bytes

CheckLinkToHref.md

File metadata and controls

8 lines (5 loc) · 436 Bytes

Pattern: Potentially unsafe model attribute in link_to

Issue: -

Description

Checks for calls to link_to which pass in potentially hazardous data to the second argument. While this argument must be html_safe to not break the html, it must also be url safe as determined by calling a :url_safe_method. This prevents attacks such as javascript:evil() or data:<encoded XSS> which is html_safe, but not safe as an href.