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

Fixing macro.py's ability to render Python non-literals. #219

Merged
merged 2 commits into from
May 29, 2024

Conversation

benbdeitch
Copy link

@benbdeitch benbdeitch commented May 29, 2024

This pull request alters the way in which Infogami renders macros.

Before, the macros were processed by creating a template to parse them through web.py's template system. Instead, it now functions through using the ast.parse method, as well as limiting the potential arguments and keyword arguments of the functions exclusively to Python literals.

@benbdeitch benbdeitch force-pushed the fix-macro-parsing branch from 34e0501 to 6ba2a37 Compare May 29, 2024 17:20
@cdrini cdrini self-assigned this May 29, 2024
@benbdeitch benbdeitch force-pushed the fix-macro-parsing branch 2 times, most recently from cb23c6c to bf6e742 Compare May 29, 2024 17:35
Copy link
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

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

Lgtm! We patch deployed this one since it has security implications.

@benbdeitch benbdeitch force-pushed the fix-macro-parsing branch from bf6e742 to a63e1ea Compare May 29, 2024 17:42
@benbdeitch benbdeitch force-pushed the fix-macro-parsing branch from a63e1ea to 8ce4adb Compare May 29, 2024 18:02
@cdrini cdrini merged commit 83eb7b8 into internetarchive:master May 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants