From dc2a338847888476aa22800c31c4c75fb55ba032 Mon Sep 17 00:00:00 2001 From: nemunaire Date: Sun, 17 Jul 2016 10:22:51 +0200 Subject: [PATCH] Security fixes --- Question.class.php | 1 + changeQuestion.php | 6 +++--- list.php | 4 ++-- questions.php | 0 validation.php | 6 +++--- 5 files changed, 9 insertions(+), 8 deletions(-) mode change 100755 => 100644 questions.php diff --git a/Question.class.php b/Question.class.php index 9ed303b..ed6f456 100644 --- a/Question.class.php +++ b/Question.class.php @@ -124,6 +124,7 @@ class Question public function validated() { $this->validated = true; + $this->reported = 0; //Return to normal ID $this->getNormalId(); diff --git a/changeQuestion.php b/changeQuestion.php index a515975..b9f6f8f 100644 --- a/changeQuestion.php +++ b/changeQuestion.php @@ -24,13 +24,13 @@ else if ($question->get_writer() != null) {?>Proposée par : get_writer()->getUsername(); ?>

Cours concerné : getCourse()->getName(); ?>

- Question posée : getQuestion(); ?>

+ Question posée : getQuestion(), ENT_COMPAT, "UTF-8")); ?>

Réponses valides exhaustives :

"; foreach($question->getAnswer() as $a) - echo "
  • ".$a."
  • "; + echo "
  • ".htmlentities($a, ENT_COMPAT, "UTF-8")."
  • "; echo ""; ?>

    @@ -64,7 +64,7 @@ foreach($cs as $c)


    - +


    diff --git a/list.php b/list.php index 9d4ec7b..7b5e328 100644 --- a/list.php +++ b/list.php @@ -26,7 +26,7 @@ else