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

Restrict access to public methods in logic_less templates #781

Merged
merged 1 commit into from
Oct 2, 2017

Conversation

gareth
Copy link
Contributor

@gareth gareth commented Sep 10, 2017

Because the LogicLess::Context object calls send for method access on its dictionary object, it means private methods are accessible.

It feels like the intention was that it's an object's public API that should be used for rendering.

This PR changes the method lookup to only query for public methods, and to call them using public_send

@minad minad merged commit db8a0c7 into slim-template:master Oct 2, 2017
@gareth gareth deleted the logicless-public-send branch October 3, 2017 18:22
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.

None yet

2 participants