Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding User/Group breaks .htpasswd #13

Open
rsuarez82 opened this issue Apr 3, 2017 · 2 comments
Open

Adding User/Group breaks .htpasswd #13

rsuarez82 opened this issue Apr 3, 2017 · 2 comments

Comments

@rsuarez82
Copy link

Whenever you add a user or a group, the .htpasswd file gets reset. So far so good.

But (!) whenever the Service class writes it puts a whitespace in front of the password which renders the file unusable.

Works:
test:$apr1$wG4BORKw$6ylmzwwbtgDvH7l13Y5QH1

Fails:
test: $apr1$wG4BORKw$6ylmzwwbtgDvH7l13Y5QH1

This is easily fixed by changing the method "formatHT" in the user & group class, so that the return string does not contain a whitespace after double-point:

    /**
     * Format to HT write
     * @return string
     */
    public function formatHT()
    {
        return "{$this->getUsername()}:{$this->getHash()}";
    }

Would've filed a Pull request, but haven't done so in quite a while. ;)

@frederickjh
Copy link

This is not an issue with rafaelgou/php-apache2-basic-auth-manager but an issue with the rafaelgou/php-apache2-basic-auth project and should be moved to the issue queue of that project.

The code referred to is in the rafaelgou/php-apache2-basic-auth project.

@frederickjh
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants