https://issues.apache.org/bugzilla/show_bug.cgi?id=51370

             Bug #: 51370
           Summary: htdigest should accept password as a command-line
                    argument
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: support
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


Created attachment 27154
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27154
patch to htdigest

Right now, htdigest forces one to enter a password interactively.  There is no
way to provide the password on the command-line.  This is inconvenient for
scripts.

I needed a script to take a list of usernames/passwords as the input and
generate a single 'htpasswd' file with all of them.  I could not find a way (in
Python) to redirect stdin to feed the appropriate password to each invocation
of htdigest.

So, I modified htdigest to accept an optional last argument being the password.
 I understand that this is not preferred due to security concerns (after all,
the password is visible in the process list).  When security is not an issue,
however, such as when I am working on my personal laptop, the most convenient
option is to pass all needed parameters on the command line.

My patch also refactors some code to avoid duplication and keep everything no
less tidy than it was.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to