[SUCS Devel] [Git][sucssite/sucs-site][master] stop .forward file being a symlink

Chris Piper hobbid at sucs.org
Fri Mar 31 14:06:05 BST 2017


Chris Piper pushed to branch master at sucssite / sucs-site


Commits:
b13af1e6 by Chris Piper at 2017-03-31T14:06:03+01:00
stop .forward file being a symlink
- - - - -


1 changed file:

- lib/session.php


Changes:

=====================================
lib/session.php
=====================================
--- a/lib/session.php
+++ b/lib/session.php
@@ -228,7 +228,7 @@ class Session
         // the bash script returns 0 for no and 1 for yes, takes one arg, username
         $this->email = shell_exec("../plugins/sucsunreadmail $user");
 
-        if (file_exists($info['homedirectory'][0] . "/.forward")) {
+        if (file_exists($info['homedirectory'][0] . "/.forward") && ! is_link($info['homedirectory'][0] . "/.forward")) {
             $forward = file($info['homedirectory'][0] . "/.forward");
             $this->email_forward = preg_replace("/\n/", "", $forward[0]);
         }



View it on GitLab: https://projects.sucs.org/sucssite/sucs-site/commit/b13af1e6fc007cc23be8563a51792ff012d64e2c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20170331/0f6999a1/attachment.html>


More information about the Devel mailing list