-
Notifications
You must be signed in to change notification settings - Fork 15
Description
hi i liked your app.. revised the code.. You have a fairly abstract vision, which makes it difficult to collaborate if you don't have good programming skills specially when dont have good OOP skills ... that makes it difficult for any person to collaborate in your application
currently the htpasswd class ( at tools/htpasswd.php) only handles a single file and assumes a single path , so it retrieves the path from the protected directory, that's fine only for shitty apache like noob admins..
in best practice deploys those files are far away from that dir,, so i guess i better to change it on the ini file in that way:
- make a new key item named
secure_fileorhtpasswdfile - in constructor of
htpasswdclass ( attools/htpasswd.php) add the supprot of independient paths - make a first string extract with
$fch = substr($htpasswdfile, 0, 1); - compared if start with
/suingstrcmp($fch, '/')ifTRUEthen use absolute paths, - make a second string extract with
$fch = substr($htpasswdfile, 0, 3); - compared if start with
../suingstrcmp($fch, '../')ifTRUEuse directory app path as reference - if both fails.. use the protected directory
thanks in advance, i suggest another more advanced option.. by usage the more advanced htpasswd class that support groups
that class provides a htpasswd with group support!