Froxlor/Froxlor — pull request #208 by Churro (2014-12-02 22:04:29+00:00)
Title: Fix for duplicate .htpasswd entries (Nginx)

Problem:
The cronjob for Nginx Vhosts creates an individual .htpasswd file for each protected paths. Since the method getHtpasswds() is called for all (sub-)domains of a specific customer, it occurs that the same pairs of user / pw are inserted multiple times into one .htpasswd file.

For example, assuming a customer has 3 domains, getHtpasswds() is invoked three times and each time adds the same credentials to the very same $htpasswd_filename. The resulting .htpasswd files look as follows:
user1:pass1
user1:pass1
user1:pass1

Solution:
Filter duplicate entries before writing out the .htpasswd file.