Skip to content

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Aug 9, 2024

Such paths should be rejected by open / stat / realpath but we were silently ignoring the tailing slashed.

Fixes: #22335

Such paths should be rejected by open / stat / realpath but we were
silently ignoring the tailing slashed.

Fixes: emscripten-core#22335
@sbc100 sbc100 force-pushed the realpath_trailing_slash branch from 253758e to f8fe795 Compare August 9, 2024 23:45
@sbc100 sbc100 requested review from dschuff and tlively August 9, 2024 23:48
testrealpath("Folder/testfile.txt/");
// folders
testrealpath("Folder");
testrealpath("/Folder");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
testrealpath("/Folder");
testrealpath("/Folder");
testrealpath("Folder/");

$decltype\28auto\29\20std::__2::__variant_detail::__visitation::__base::__dispatcher<0ul\2c\200ul>::__dispatch\5babi:nn180100\5d<void\20std::__2::__variant_detail::__ctor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>>::__generic_construct\5babi:nn180100\5d<std::__2::__variant_detail::__move_constructor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>\2c\20\28std::__2::__variant_detail::_Trait\291>>\28std::__2::__variant_detail::__ctor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>>&\2c\20std::__2::__variant_detail::__move_constructor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>\2c\20\28std::__2::__variant_detail::_Trait\291>&&\29::'lambda'\28std::__2::__variant_detail::__move_constructor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>\2c\20\28std::__2::__variant_detail::_Trait\291>&\2c\20auto&&\29&&\2c\20std::__2::__variant_detail::__base<\28std::__2::__variant_detail::_Trait\291\2c\20long\2c\20std::__2::shared_ptr<wasmfs::File>>&\2c\20std::__2::__variant_detail::__base<\28std::__2::__variant_detail::_Trait\291\2c\20long\2c\20std::__2::shared_ptr<wasmfs::File>>&&>\28std::__2::__variant_detail::__move_constructor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>\2c\20\28std::__2::__variant_detail::_Trait\291>\2c\20std::__2::__variant_detail::__base<\28std::__2::__variant_detail::_Trait\291\2c\20long\2c\20std::__2::shared_ptr<wasmfs::File>>&\2c\20std::__2::__variant_detail::__base<\28std::__2::__variant_detail::_Trait\291\2c\20long\2c\20std::__2::shared_ptr<wasmfs::File>>&&\29
$decltype\28auto\29\20std::__2::__variant_detail::__visitation::__base::__dispatcher<1ul>::__dispatch\5babi:nn180100\5d<std::__2::__variant_detail::__dtor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>\2c\20\28std::__2::__variant_detail::_Trait\291>::__destroy\5babi:nn180100\5d\28\29::'lambda'\28auto&\29&&\2c\20std::__2::__variant_detail::__base<\28std::__2::__variant_detail::_Trait\291\2c\20long\2c\20std::__2::shared_ptr<wasmfs::File>>&>\28auto\2c\20std::__2::__variant_detail::__base<\28std::__2::__variant_detail::_Trait\291\2c\20long\2c\20std::__2::shared_ptr<wasmfs::File>>&\29
$decltype\28auto\29\20std::__2::__variant_detail::__visitation::__base::__dispatcher<1ul\2c\201ul>::__dispatch\5babi:nn180100\5d<void\20std::__2::__variant_detail::__ctor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>>::__generic_construct\5babi:nn180100\5d<std::__2::__variant_detail::__move_constructor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>\2c\20\28std::__2::__variant_detail::_Trait\291>>\28std::__2::__variant_detail::__ctor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>>&\2c\20std::__2::__variant_detail::__move_constructor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>\2c\20\28std::__2::__variant_detail::_Trait\291>&&\29::'lambda'\28std::__2::__variant_detail::__move_constructor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>\2c\20\28std::__2::__variant_detail::_Trait\291>&\2c\20auto&&\29&&\2c\20std::__2::__variant_detail::__base<\28std::__2::__variant_detail::_Trait\291\2c\20long\2c\20std::__2::shared_ptr<wasmfs::File>>&\2c\20std::__2::__variant_detail::__base<\28std::__2::__variant_detail::_Trait\291\2c\20long\2c\20std::__2::shared_ptr<wasmfs::File>>&&>\28std::__2::__variant_detail::__move_constructor<std::__2::__variant_detail::__traits<long\2c\20std::__2::shared_ptr<wasmfs::File>>\2c\20\28std::__2::__variant_detail::_Trait\291>\2c\20std::__2::__variant_detail::__base<\28std::__2::__variant_detail::_Trait\291\2c\20long\2c\20std::__2::shared_ptr<wasmfs::File>>&\2c\20std::__2::__variant_detail::__base<\28std::__2::__variant_detail::_Trait\291\2c\20long\2c\20std::__2::shared_ptr<wasmfs::File>>&&\29
$dummy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WasmFS code is only removed in this PR - why is this growing?

@sbc100 sbc100 closed this Jan 3, 2025
@sbc100 sbc100 deleted the realpath_trailing_slash branch January 3, 2025 22:45
@sbc100 sbc100 restored the realpath_trailing_slash branch January 4, 2025 00:58
@sbc100 sbc100 reopened this Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants