Guest User

Untitled

a guest
Mar 23rd, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. --- squirrelmail.stable/squirrelmail/class/deliver/Deliver.class.php 2017-01-27 21:31:33.000000000 +0100
  2. +++ htdocs/class/deliver/Deliver.class.php 2018-03-14 17:21:10.320000000 +0100
  3. @@ -281,6 +281,7 @@
  4. global $username, $attachment_dir;
  5. $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
  6. $filename = $message->att_local_name;
  7. + if(!ctype_alnum($filename)) die();
  8.  
  9. // inspect attached file for lines longer than allowed by RFC,
  10. // in which case we'll be using base64 encoding (so we can split
  11. @@ -339,6 +340,7 @@
  12. global $username, $attachment_dir;
  13. $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
  14. $filename = $message->att_local_name;
  15. + if(!ctype_alnum($filename)) die();
  16. $file = fopen ($hashed_attachment_dir . '/' . $filename, 'rb');
  17.  
  18. while ($tmp = fread($file, 570)) {
Add Comment
Please, Sign In to add comment