Ticket #306 (new defect)
Opened 3 years ago
paste.auth.grantip ipmap parsing borken
| Reported by: | mjpieters | Owned by: | ianb |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.1 |
| Component: | paste | Version: | svn-trunk |
| Severity: | normal | Keywords: | |
| Cc: |
Description
paste.auth.grantip.make_grantip parses out user:role lines into username and role variable, only to then discard the parsed values and storing the original unparsed line in the ipmap:
for key, value in kw.items(): if ':' in value: username, role = value.split(':', 1) else: username = value role = '' if username == '-': username = '' if role == '-': role = '' ip_map[key] = value
Replacing the last line with:
ip_map[key] = (username, role)
fixes this issue, making the grantip filter actually usable.
Note: See
TracTickets for help on using
tickets.
