Skip to content
Extraits de code Groupes Projets
Valider 5cbccda3 rédigé par Dorian's avatar Dorian
Parcourir les fichiers

Spec for not allowing user to do the XSS

parent 29344522
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -41,6 +41,14 @@ describe ApplicationHelper do ...@@ -41,6 +41,14 @@ describe ApplicationHelper do
person_image_link(@person).should include(person_path(@person)) person_image_link(@person).should include(person_path(@person))
end end
end end
describe "#person_image_tag" do
it "should not allow basic XSS/HTML" do
@person.profile.first_name = "I'm <h1>Evil"
@person.profile.last_name = "I'm <h1>Evil"
person_image_tag(@person).should_not include("<h1>")
end
end
describe "markdownify" do describe "markdownify" do
describe "autolinks" do describe "autolinks" do
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter