Menu

#2 using strstr for "admin" is flawed

open
nobody
None
5
2006-11-29
2006-11-29
Nigel Reed
No

My script fails when it comes across the following fine in functions.inc.php

if(strstr(getcwd(),"admin")) {

Since my newsletter is in /var/www/newsletter/sysadmin/lists

It assumes I am in the admin directory when I am not.

Discussion

  • Nigel Reed

    Nigel Reed - 2006-11-29

    Logged In: YES
    user_id=270178
    Originator: YES

    Meant to add that a quick dirty fix would be to use the following:

    using strstr for "/admin/" is flawed. The user should be aware of this.

     
  • Can Ince

    Can Ince - 2006-12-05

    Logged In: YES
    user_id=1355618
    Originator: NO

    Thanks for reporting. We'll release a new version when we'll have time. SVN cotains more up-to-date code. Please use it instead, until we'll release the next version.

     

Log in to post a comment.