You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It tries to truncate the path of the index file s.t. the file extension is removed. This is done by searching for the first occurence of . with find. If there is one everything after this first found dot is removed. This method fails if the path itself contains a /../. AFAIK even /./ in paths result in valid paths.
Example
E.g. take the path /local/data/vvz/tf-support/../completesearch-new/data/vvz/vvz.hybrid. The correct baseName would be /local/data/vvz/tf-support/../completesearch-new/data/vvz/vvz. But the code determines /local/data/vvz/tf-support/ as baseName
Possible fix
This could be possibly be fixed by replacing string::find with string::find_last_of.
The text was updated successfully, but these errors were encountered:
Issue
When using a path that contains a
/../
for the for the index the path is truncated in a wrong way.Explanation
The responsible code is
completesearch/src/server/StartCompletionServer.cpp
Lines 429 to 430 in bfb452b
It tries to truncate the path of the index file s.t. the file extension is removed. This is done by searching for the first occurence of
.
with find. If there is one everything after this first found dot is removed. This method fails if the path itself contains a/../
. AFAIK even/./
in paths result in valid paths.Example
E.g. take the path
/local/data/vvz/tf-support/../completesearch-new/data/vvz/vvz.hybrid
. The correctbaseName
would be/local/data/vvz/tf-support/../completesearch-new/data/vvz/vvz
. But the code determines/local/data/vvz/tf-support/
asbaseName
Possible fix
This could be possibly be fixed by replacing
string::find
withstring::find_last_of
.The text was updated successfully, but these errors were encountered: