Bug 1019860 - Trailing slashes (eq. /jobs/mine/ instead of /jobs/mine) in URLs break hypertext links created under that page.
Summary: Trailing slashes (eq. /jobs/mine/ instead of /jobs/mine) in URLs break hypert...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Beaker
Classification: Retired
Component: web UI
Version: 0.14
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-16 14:08 UTC by Jarod Wilson
Modified: 2019-04-12 14:19 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-04-12 13:50:28 UTC
Embargoed:


Attachments (Terms of Use)

Comment 2 Raymond Mancy 2013-10-17 00:56:11 UTC
We use relative URLs and so the trailing slash messes things up in that instance (and it other places I'm sure). I think that ideally CherryPy should just return a 404 if you go to jobs/mine/, but it doesn't. I'm not sure if there is a way to make it do so.

AFAIK werkzeug routes (that we use with Flask now) would return a 404, but the jobs/mine handler is not using this yet.

Comment 3 Nick Coghlan 2013-10-17 01:03:49 UTC
The relative job URLs on the My Jobs page (<site>/jobs/mine/) are not generated correctly when the trailing slash is included in the page URL: they look like "<site>/jobs/mine/<job number>" rather than the desired "<site>/jobs/<job number>".

The problem actually appears to affect all relative URLs on the page, including the search link (which also adds an extra "/mine/" segment).

These broken URLs then trigger a 500 error when attempting to load them (likely due to the page attempting to interpret the mangled additions as search criteria).

Comment 4 Nick Coghlan 2013-10-17 01:06:41 UTC
Since Flask is the default WSGI handler now, we should be able to deal more systematically with trailing slashes (likely by automatically removing them, as that will avoid breaking currently working bookmarks)

Comment 5 Nick Coghlan 2013-10-17 01:07:09 UTC
(Where by "now" I mean, in Beaker 0.15+)

Comment 7 Nick Coghlan 2014-02-07 01:41:03 UTC
The upgrade to Flask actually fixed this.

Comment 8 Nick Coghlan 2014-02-07 05:06:10 UTC
Sorry, misread the bug. Fixing the title :)

Comment 9 Dan Callaghan 2014-10-13 04:45:38 UTC
Fixing this requires porting those pages away from TurboGears to use a Backgrid, which is finally *possible* as of Beaker 19, but it won't make it into this release. We'll get there eventually...

Comment 10 Tomas Klohna 🔧 2019-04-12 13:50:28 UTC
Fixing this would require an ugly TG workaround.
Quick check found that there are much more pages affected by this (eq. /jobs/mygroups/), so I'm changing the title.

We will fix this in the Flask migration. Because of that, I'm closing this ticket and assigning it under correct Epic in Jira, so we can verify it once the migration is complete.


Note You need to log in before you can comment on or make changes to this bug.