Opened 10 years ago

Closed 10 years ago

#1816 closed enhancement (fixed)

Allow file server items to re-map URI paths to a different path

Reported by: Nicklas Nordborg Owned by: everyone
Priority: major Milestone: BASE 3.3
Component: core Version:
Keywords: Cc:

Description

A file item that is a reference to an external file define an absolute URI in the form:

schema://host/path

When the file item is linked with a FileServer item the file server replaces the host part with the host and port defined by the file server. Eg.

http://host.org/doc.txt could be re-mapped to http://otherhost.org/doc.txt

In some cases it would be useful to also be able to re-map the path part. For example if someone wants to implement a file:// or sftp:// protocol handler it would not be advisable to be able to get *any* file on the server by saying file:///path/to/sensitive/data.

It would be useful if the file server item defines a 'safe' root path that is automatically added to the file URI. Eg.

file:///path/to/data is re-mapped to file:///safe-root/path/to/data

In this case we must also make sure that the URI doesn't contain '..' to move upwards in the directory structure thereby bypassing the safe root path.

Change History (1)

comment:1 by Nicklas Nordborg, 10 years ago

Resolution: fixed
Status: newclosed

(In [6488]) Fixes #1816: Allow file server items to re-map URI paths to a different path

Note: See TracTickets for help on using tickets.