aboutsummaryrefslogtreecommitdiff
path: root/src/judge
diff options
context:
space:
mode:
Diffstat (limited to 'src/judge')
-rw-r--r--src/judge/clar.php4
-rw-r--r--src/judge/claredit.php4
-rw-r--r--src/judge/history.php4
-rw-r--r--src/judge/runedit.php2
-rw-r--r--src/judge/team.php2
5 files changed, 7 insertions, 9 deletions
diff --git a/src/judge/clar.php b/src/judge/clar.php
index a5d56ce..a195af8 100644
--- a/src/judge/clar.php
+++ b/src/judge/clar.php
@@ -49,7 +49,7 @@ $clar = DBOpenClarsInSites($_SESSION["usertable"]["contestnumber"], $s["sitejudg
for ($i=0; $i<count($clar); $i++) {
echo " <tr>\n";
- if (strpos($clar[$i]["status"], "answered") === false)
+ if (strpos($clar[$i]["status"], "answered") === false) // && strpos($_SESSION["usertable"]['username'], "setter") !== false)
echo " <td nowrap><a href=\"claredit.php?clarnumber=".$clar[$i]["number"]."&clarsitenumber=".$clar[$i]["site"] .
"\">" . $clar[$i]["number"] . "</td>\n";
else
@@ -71,7 +71,7 @@ for ($i=0; $i<count($clar); $i++) {
echo " <td>";
// echo "<pre>" . $clar[$i]["question"] . "</pre>";
// echo $clar[$i]["question"];
- echo " <textarea name=\"m$i\" cols=\"60\" rows=\"8\" readonly>".$clar[$i]["question"]."</textarea>\n";
+ echo " <textarea name=\"m$i\" cols=\"60\" rows=\"8\" readonly>". unsanitizeText($clar[$i]["question"]) ."</textarea>\n";
echo "</td>\n";
echo " </tr>\n";
diff --git a/src/judge/claredit.php b/src/judge/claredit.php
index c459747..a5c3265 100644
--- a/src/judge/claredit.php
+++ b/src/judge/claredit.php
@@ -111,13 +111,13 @@ if (($a = DBGetClarToAnswer($clarnumber, $clarsitenumber,
<tr>
<td width="20%" align=right><b>Clarification:</b></td>
<td width="80%">
- <textarea name="message" readonly cols="60" rows="8"><?php echo $a["question"]; ?></textarea>
+ <textarea name="message" readonly cols="60" rows="8"><?php echo unsanitizeText($a["question"]); ?></textarea>
</td>
</tr>
<tr>
<td width="20%" align=right><b>Answer:</b></td>
<td width="80%">
- <textarea name="answer" cols="60" rows="8"><?php echo $a["answer"]; ?></textarea>
+ <textarea name="answer" cols="60" rows="8"><?php echo unsanitizeText($a["answer"]); ?></textarea>
</td>
</tr>
<tr>
diff --git a/src/judge/history.php b/src/judge/history.php
index b612f9a..a6bcc79 100644
--- a/src/judge/history.php
+++ b/src/judge/history.php
@@ -54,13 +54,13 @@ for ($i=0; $i<count($clar); $i++) {
echo " <td>";
// echo "<pre>" . $clar[$i]["question"] . "</pre>";
// echo $clar[$i]["question"];
- echo " <textarea name=\"m$i\" cols=\"60\" rows=\"8\" readonly>".$clar[$i]["question"]."</textarea>\n";
+ echo " <textarea name=\"m$i\" cols=\"60\" rows=\"8\" readonly>". unsanitizeText($clar[$i]["question"]) ."</textarea>\n";
echo "</td>\n";
if (trim($clar[$i]["answer"]) == "") $clar[$i]["answer"] = "Not answered yet";
echo " <td>";
// echo " <pre>" . $clar[$i]["answer"] . "</pre>";
// echo $clar[$i]["answer"];
- echo " <textarea name=\"a$i\" cols=\"60\" rows=\"8\" readonly>".$clar[$i]["answer"]."</textarea>\n";
+ echo " <textarea name=\"a$i\" cols=\"60\" rows=\"8\" readonly>". unsanitizeText($clar[$i]["answer"]) ."</textarea>\n";
echo "</td>\n";
echo " </tr>\n";
diff --git a/src/judge/runedit.php b/src/judge/runedit.php
index e53b3a3..c77f26e 100644
--- a/src/judge/runedit.php
+++ b/src/judge/runedit.php
@@ -101,8 +101,6 @@ $b = DBGetProblemData($_SESSION["usertable"]["contestnumber"], $a["problemnumber
<td width="83%">
<?php
for ($i=0;$i<count($b);$i++) {
- $if = rawurlencode($b[$i]["inputfilename"]);
-
echo "<a href=\"../filedownload.php?". filedownload($b[$i]["inputoid"],$b[$i]["inputfilename"]) . "\">";
echo basename($b[$i]["inputfilename"]) . "</a>";
}
diff --git a/src/judge/team.php b/src/judge/team.php
index 745380a..13e3e4e 100644
--- a/src/judge/team.php
+++ b/src/judge/team.php
@@ -75,7 +75,7 @@ $redo = TRUE;
if(!isset($_SESSION['forceredo']) || $_SESSION['forceredo']==false) {
$actualdelay = 30;
if(file_exists($runtmp)) {
- if(isset($strtmp) || (($strtmp = file_get_contents($runtmp,FALSE,NULL,-1,1000000)) !== FALSE)) {
+ if(isset($strtmp) || (($strtmp = file_get_contents($runtmp,FALSE,NULL,0,1000000)) !== FALSE)) {
list($d) = sscanf($strtmp,"%*s %d");
if($d > time() - $actualdelay) {
$conf=globalconf();