Skip to content
This repository has been archived by the owner on Mar 2, 2019. It is now read-only.
Permalink
Browse files Browse the repository at this point in the history
Fix XSS
  • Loading branch information
s3131212 committed May 7, 2017
1 parent a1508e4 commit 37b6a63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions downfile.php
Expand Up @@ -102,8 +102,8 @@ function check_dir($id)
?></br>檔案大小:<?php sizecount($res[0]['size'] / 1000 / 1000);
?></br>上傳時間:<?php echo $res[0]['date'];
?></p>
<p><a href="rdownfile.php?id=<?php echo $_GET['id'];
?>&password=<?php echo $_GET['password'];
<p><a href="rdownfile.php?id=<?php echo htmlspecialchars($_GET['id']);
?>&password=<?php echo htmlspecialchars($_GET['password']);
?>" class="btn btn-large btn-primary">下載</a></p>
<?php
} else {
Expand Down
2 changes: 1 addition & 1 deletion loginc.php
Expand Up @@ -42,7 +42,7 @@ function md5_128($text)

case 1:
$_SESSION['login'] = true;
$_SESSION['username'] = $username;
$_SESSION['username'] = htmlspecialchars($username);
$_SESSION['password'] = md5_128($password);
echo 2;
break;
Expand Down

0 comments on commit 37b6a63

Please sign in to comment.