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

Switch default list of page 2 variables from 'all of them' to 'Nothing'. #215

Open
pjz opened this issue Aug 12, 2013 · 4 comments
Open

Comments

@pjz
Copy link
Contributor

pjz commented Aug 12, 2013

In #165 we added __all__ as a way to specify what variables get 'exported' from page 2 to the template. The default behavior, if no __all__ exists, is to export everything. This is arguably a security footgun, and the default behavior should be changed to export nothing, thus making all exports explicit.

Note that changing it will break everything: all test that use simplates, all existing aspen sites. Everything. To save us some work, we need an 'unstrict' config flag or something that will preserve old behavior.

@chadwhitacre
Copy link
Contributor

Idea on October 2014 call: how about constraining to locals() rather than whitelisting with __all__?

@chadwhitacre
Copy link
Contributor

chadwhitacre commented Sep 8, 2016

@Changaco What do you think of this for 1.0 (#357)?

@Changaco
Copy link
Member

Changaco commented Sep 8, 2016

I think that the implicit passing of variables between pages is precisely the strength of simplates. AspenWeb/aspen.py#27 seems like a better solution to me than changing the default behaviour of simplates.

@chadwhitacre
Copy link
Contributor

This goes away if we ditch simplates in AspenWeb/aspen.py#30. 😈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants