You are here: Foswiki>Tasks Web>Item13578 (18 Feb 2017, GeorgeClark)Edit Attach

Item13578: Configure guesses relative path names with .. in them.

pencil
Priority: Enhancement
Current State: Closed
Released In: 2.1.3
Target Release: patch
Applies To: Extension
Component: ConfigureBootstrap
Branches: Item14180 Release02x01 master
Reported By: KennethLavrsen
Waiting For:
Last Change By: GeorgeClark
When configure guesses the path to {PubUrlPath} is will in some cases put a relative path with ..

For example something/bin/../pub instead of something/pub

It seems to be related to using long path names incl bin and not short path names. Ie there is bin in the URLs

The consequence is that %PUBURL% macro gets the .. in it and INCLUDEs with .. fails with illegal character. That is how I found it

-- KennethLavrsen - 29 Jul 2015

Repo

-- JozefMojzis - 29 Jul 2015

I don't know that we have a good solution here other than maybe warning that the path is relative. Bootstrap is extremely complex due to the the wide variety where it tries to guess these parameters. Any bootstrap changes need testing on all supported OS and WebServer and File System variants. Including soft-links to paths, nginx, lighttpd, apache, mod_perl, fcgi, And also configurations where the "bin" path might be cgi-bin.

There is an attempt at unit tests in the TestBootstrapPlugin however it is out-of-date from the latest code and needs updating.

-- GeorgeClark - 29 Jul 2015

Maybe a simple regex that removes dirname/.. from the path it has guessed.

A dirname/.. will always cancel itself out.

-- KennethLavrsen - 29 Jul 2015

Fixed by pruning the last component (bin, cgi-bin, etc) and replacing it with pub. Not sure this covers all cases though. Committing to 2.1.3

-- GeorgeClark - 01 Nov 2016
 

ItemTemplate edit

Summary Configure guesses relative path names with .. in them.
ReportedBy KennethLavrsen
Codebase 2.1.2, 2.1.1, 2.1.0, trunk
SVN Range
AppliesTo Extension
Component ConfigureBootstrap
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins distro:5eb452705144
TargetRelease patch
ReleasedIn 2.1.3
CheckinsOnBranches Item14180 Release02x01 master
trunkCheckins
masterCheckins distro:5eb452705144
ItemBranchCheckins distro:5eb452705144
Release02x01Checkins distro:5eb452705144
Release02x00Checkins
Release01x01Checkins
Topic revision: r9 - 18 Feb 2017, GeorgeClark - This page was cached on 16 Nov 2017 - 13:17.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License