Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
passlib
passlib
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 30
    • Issues 30
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • python-libs
  • passlibpasslib
  • Issues
  • #89

Closed
Open
Created Apr 07, 2017 by Bitbucket Importer@bitbucket_importerOwner

HtpasswdFile does not like additional fields

Created originally on Bitbucket by Anonymous

Apache and nginx actively support 2 or more colon-separated fields in an htpasswd file. But such files break in HtpasswdFile because of this exception. I explained this, and showed evidence from the apache and nginx sorce code, in this bug report on trac: https://trac.edgewall.org/ticket/12744#comment:2. (Sorry, nicely formatted links aren't working with that URL for some reason.)

You mentioned elsewhere that there isn't an official spec for the htpasswd format, which makes it hard to know just what makes an acceptable file. But the source code in both projects makes clear that this is not an accident; additional colon-separated fields are allowed. You could allow this by changing

if len(result) != 2:

to

if len(result) < 2:

I have not looked at the code for digest, but corresponding changes may be needed there, as Ryan J Ollos suggested on trac.

Edited Oct 09, 2020 by Eli Collins
Assignee
Assign to
1.8
Milestone
1.8
Assign milestone
Time tracking
None
Due date
None