[MNT-11370] redirecting to another side replaces first occurance of sitename string instead of creating correct urls Created: 29-Apr-14  Updated: 18-Jul-14  Resolved: 23-May-14

Status: Closed
Project: Service Packs and Hot Fixes
Component/s: Share Application
Affects Version/s: 4.1.6
Fix Version/s: 4.1.9

Type: Bug
Reporter: Heiko Robert Assignee: Closed Bugs (Inactive)
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 2 weeks, 1 day
Original Estimate: Not Specified

Issue Links:
relates to ALF-20929 MNT-9081 does not care about secondar... Closed
relates to MNT-9081 After moving content between sites th... Closed
Bug Priority:
Category 2
Build Location: http://releases.alfresco.com/Enterprise%204.1/4.1.9/build-00036/
Regression Since:


The feature implementend in https://issues.alfresco.com/jira/browse/MNT-9081 does not build the url in a save/correct way:
it just replaces the first occurance of the sitename in the url string with the sitename where the doc is really stored.
e.g. if the
servername is coolname
and the sitename1 is coolname
and the sitename2 is foolname

the redirect url will be: foolname/share/page/site/coolname/document-details?nodeRef=...

Comment by Heiko Robert [ 29-Apr-14 ]

btw: please avoid beginners code style string operations in return values where correct encapulation and api should be used. This kind makes it a nightmare to extend the Share UI

Comment by Pete Philips [X] (Inactive) [ 29-Apr-14 ]

Is this a security problem? (I see the High severity setting).

Comment by Heiko Robert [ 29-Apr-14 ]

YES: it's possible to redirect to other hosts

Comment by Heiko Robert [ 29-Apr-14 ]

my recommendation is to deactivate the redirect at all and to refactor the breadcrumb generation which is bad design today since it uses hard coded the site url instead of methods executed from the node context

Comment by Alfresco QA Team (Inactive) [ 23-May-14 ]

Successfully validated using Alfresco Enterprise v4.1.9 (r71649-b1054), Redhat 6.4 x64, Tomcat, PostgreSQL, Java 7 (all installer deployed) Client: FF, Windows x64

Generated at Sun Mar 07 00:15:13 GMT 2021 using Jira 7.13.15#713015-sha1:7c5ddd2c3e1709974ae9c48c17df8edd3919fe2c.