Anatomy of list ids does not keep with that of urls causes some REST end points to return 404 always
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
In Progress
|
Undecided
|
Ankush Sharma | ||
GNU Mailman REST Client |
In Progress
|
Undecided
|
Ankush Sharma | ||
Postorius |
In Progress
|
Undecided
|
Ankush Sharma |
Bug Description
The hash(#) and question mark(?) is a valid character as far as the local part of the email addresses is concerned.
Reference: http://
So, as the mailing list addresses are email addresses too, we can use # in the list names too. And, in context with mailman it works well. We can create a list with list_id sam#hashed.host.org for the address sam#<email address hidden> . This works fine. But it makes the list_id to contain the hash character and therefore the REST endpoint for retrieving list wise info becomes invalid, i.e :
<api-root>
Because in an URL the stuff after # is treated as document starting point i.e an id identifier or something of a dom element. This is not a valid PATH for the server. Therefore the falcon wsgi request object does not contain information of that and the req.path simply returns sam as the list_id ( http://
The mailman client works fine, it sends a GET to <api-root>
This causes the REST end points which needs list_id to return 404 or in worse we can have a list_id clash between ids sam#XXXXX and sam. Further more if the list_id starts with a # character then the server finds list_id to be empty string and therefore we get a KEY ERROR because fqdn_listname is not set too. The bug highly effects postorius too. The lists index template at /postorius/lists/ cannot be rendered as it uses the former REST endpoint and again a 404 is given. And, until we delete this list from the database, we can't do anything except of getting a 404 and KEY ERROR each time.
Bug discussed in detail here: http://
Related branches
- Barry Warsaw: Needs Fixing
-
Diff: 22 lines (+4/-1)1 file modifiedsrc/mailman/rest/root.py (+4/-1)
- Mailman Coders: Pending requested
-
Diff: 157 lines (+47/-12)2 files modifiedsrc/mailmanclient/_client.py (+25/-12)
src/mailmanclient/utils.py (+22/-0)
description: | updated |
Changed in mailman: | |
status: | New → Confirmed |
Changed in postorius: | |
status: | New → Confirmed |
Changed in mailman: | |
assignee: | nobody → Ankush Sharma (black-perl) |
Changed in postorius: | |
assignee: | nobody → Ankush Sharma (black-perl) |
description: | updated |
description: | updated |
description: | updated |
tags: | added: mailman.client |
Changed in mailman.client: | |
status: | New → Confirmed |
assignee: | nobody → Ankush Sharma (black-perl) |
Changed in mailman: | |
status: | Confirmed → In Progress |
Changed in mailman.client: | |
status: | Confirmed → In Progress |
Changed in postorius: | |
status: | Confirmed → In Progress |
Anyone got into trouble after replication of this bug can refer here : https:/ /gist.github. com/black- perl/b5a36089ed 9c1939391f