You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Alexander Rojas (JIRA)" <ji...@apache.org> on 2016/05/26 18:27:12 UTC
[jira] [Created] (MESOS-5463) mesos::internal::Files gets in an
invalid state if the paths "/" and "" are attached
Alexander Rojas created MESOS-5463:
--------------------------------------
Summary: mesos::internal::Files gets in an invalid state if the paths "/" and "" are attached
Key: MESOS-5463
URL: https://issues.apache.org/jira/browse/MESOS-5463
Project: Mesos
Issue Type: Bug
Components: technical debt
Affects Versions: 0.29.0
Reporter: Alexander Rojas
Priority: Trivial
Part of the code for attaching a path to {{mesos::internal::Files}} includes removing [trailing slashes|https://github.com/apache/mesos/blob/6ce476461f0fedfb4ed4e40c15f25bb79a39b0f3/src/files/files.cpp#L238]. Which leads to attaching "{{/}}" and "{{}}" equivalent and could lead to rewriting one with the other:
{code}
files.attach("/tmp", "/"); // Request to http://localhost:5050/files/browse?path=/ returns /tmp
files.attach("/usr/dev", ""); // Request to http://localhost:5050/files/browse?path=/ returns /usr/dev
{code}
Note that the empty path cannot be queried since it results in the invalid request {{http://localhost:5050/files/browse?path=}}.
Given the last statement, probably the easiest solution is to forbid attaching the empty path.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)