Skip to content

support independient path for htpasswd file #1

@mckaygerhard

Description

@mckaygerhard

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:

  1. make a new key item named secure_file or htpasswd file
  2. in constructor of htpasswd class ( at tools/htpasswd.php) add the supprot of independient paths
  3. make a first string extract with $fch = substr($htpasswdfile, 0, 1);
  4. compared if start with / suing strcmp($fch, '/') if TRUE then use absolute paths,
  5. make a second string extract with $fch = substr($htpasswdfile, 0, 3);
  6. compared if start with ../ suing strcmp($fch, '../') if TRUE use directory app path as reference
  7. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions