Screencast: Schutz vor XSS in Rails 3

XSS (Cross-Site Scripting), eine Bezeichnung für das Ausnutzen von Sicherheitslücken innerhalb von Webanwendungen, sollte in allen WEB-Applikationen unterbunden werden. Ryan zeigt in dieser Woche welche Änderungen in Rails 3 den Entwickler dabei unterstützt, um von Anfang an mögliche Sicherheitslücken zu vermeiden.

 

Download:

Download (15.7 MB, 8:56)
alternative download for iPod & Apple TV (11.1 MB, 8:56)

 

Resourcen:

 

Quellcode:

<!-- views/comments/_comment.html.erb -->
<div class="comment">
  <%= strong link_to(comment.name, comment.url) %>
  <p><%= comment.content %></p>
</div>
# rails
"foo".html_safe?
safe = "safe".html_safe
safe.html_safe?

# application_helper.rb
def strong(content)
  "<strong>#{h(content)}</strong>".html_safe
end

Eingestellt am 08.03.2010 um 11:02

Kategorie: Tutorials

Be Sociable, Share!

Kommentare für diesen Artikel wurden geschlossen.

Suchen auf rubyonrails.de

Aktuelle Rails Version + Abhängigkeiten:

Gem rails-3.0.0
actionmailer (= 3.0.0, runtime)
actionpack (= 3.0.0, runtime)
activerecord (= 3.0.0, runtime)
activeresource (= 3.0.0, runtime)
activesupport (= 3.0.0, runtime)
bundler (~> 1.0.0, runtime)
railties (= 3.0.0, runtime)

Rails auf Rubyforge
Rails auf Github