BoxLang: Our new JVM Dynamic Language made by Ortus! Check it out: https://www.boxlang.io

double forward slash generated in buildLink

Description

When a query string is provided to the BuildLink function, when SES URLs are being used, the code tries to determine if a forward slash needs to be added to the arguments.LinkTo value, but instead of checking the linkTo value for a trailing forward slash, it is checking arguments.queryString (requestContext.cfc line 823), which is almost guaranteed to never have a trailing forward slash and thus will always add the forward slash to the LinkTo value, producing a double forward slash if the linkTo value already ends with one.

this issue goes back to Feb 8, 2011 when the same problem was addressed.

Gliffy Diagrams

Activity

Show:

Luis MajanoFebruary 26, 2016 at 6:31 PM

Found it.

Thanks, squashed.

Bryan HendersonFebruary 24, 2016 at 4:42 PM

the following will reproduce the issue when placed in a view and SES is enabled:

event.buildLink(linkTo='my/event/handler/', queryString='one=1&two=2')

the result is (with the coldbox app installed at 'site/'):

/site/my/event/handler//one/1/two/2

Luis MajanoFebruary 22, 2016 at 9:22 PM

Do you have a test case to reproduce this.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Original estimate

Time tracking

No time logged0.08h remaining

Components

Fix versions

Priority

Sentry

Created February 22, 2016 at 9:02 PM
Updated February 26, 2016 at 6:31 PM
Resolved February 26, 2016 at 6:31 PM

Flag notifications