#26 Bare content files starting with . or _ are not properly hidden

Closed
opened 2 months ago by hz · 2 comments
hz commented 2 months ago

Part of CAT-SOOP’s specification format is that resources starting with _ or . are not viewable via the web (or, at least, that they are reserved for CAT-SOOP’s use). This is properly handled in the case of a directory that starts with _ or . and contains a content.md or other content file, but it is not the case for bare content files.

For example, a file called _hidden.md inside of course/somewhere will be web accessible under <cs_url_root>/course/somewhere/_hidden.

Part of CAT-SOOP's specification format is that resources starting with `_` or `.` are not viewable via the web (or, at least, that they are reserved for CAT-SOOP's use). This is properly handled in the case of a directory that starts with `_` or `.` and contains a `content.md` or other content file, but it is not the case for bare content files. For example, a file called `_hidden.md` inside of `course/somewhere` will be web accessible under `<cs_url_root>/course/somewhere/_hidden`.
hz added this to the 14.0.0 milestone 2 months ago
hz added the
bug
label 2 months ago
hz added the
beginner friendly
label 2 months ago
hz commented 2 months ago
Owner

This whole function could use some refactoring, but the relevant portion of code is near the bottom of content_file_location in dispatch.py. I think it should just be another check in the case we’re loading from a file, to make sure not only that the file in question exists, but also that it does not start with _ or ..

This whole function could use some refactoring, but the relevant portion of code is near the bottom of `content_file_location` in `dispatch.py`. I think it should just be another check in the case we're loading from a file, to make sure not only that the file in question exists, but also that it does not start with `_` or `.`.
hz commented 1 month ago
Owner

Should be fixed in 3e47be08ce

Should be fixed in 3e47be08ce8d3cbb9a5b3ef21c897e9d103c4f2c
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.