Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /arcade and program #1662

Closed
wants to merge 6 commits into from
Closed

Add /arcade and program #1662

wants to merge 6 commits into from

Conversation

joenash
Copy link
Contributor

@joenash joenash commented May 26, 2024

This PR adds /arcade, and subpages for the content.
I copied the structure and generation of /about because having .md files for the entries appealed to me, but it might have been a slightly jank way of achieving this, open to suggestions. The <details> tag to make the nav usable might need some styling work.


def render_markdown(source, **view_variables):
template_root = Path(path.join(app.root_path, app.template_folder)).resolve()
source_file = template_root.joinpath(f"{source}.md").resolve()

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
template_root = Path(path.join(app.root_path, app.template_folder)).resolve()
source_file = template_root.joinpath(f"{source}.md").resolve()

if not source_file.is_relative_to(template_root) or not source_file.exists():

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
if not source_file.is_relative_to(template_root) or not source_file.exists():
return abort(404)

with open(source_file, "r") as f:

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
@marksteward
Copy link
Member

Rebased and merged as d368da7

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.

2 participants