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

Smarty Security isTrustedResourceDir() does not work properly when using multiple Security objects #247

Closed
blaaat opened this issue Jun 16, 2016 · 1 comment

Comments

@blaaat
Copy link

blaaat commented Jun 16, 2016

In commit aee07f7 a full rewrite of this method is implemented.

When enabling en disabling security multiple times with different security objects; only the first object adds the template_dirs to it's _resource_dir variable.

This code will fail:

$smarty->enableSecurity('UserInput_Smarty_Security');
$smarty->display('a');
$smarty->disableSecurity();

$smarty->display('safe_template');

$smarty->enableSecurity('UserInput_Smarty_Security');
$smarty->display('a');
$smarty->disableSecurity();

Maybe add a bool to Smarty_security and check if the object has the template/config directories?

@uwetews
Copy link
Contributor

uwetews commented Jul 12, 2016

The bugfix is now in the master branch

@uwetews uwetews closed this as completed Jul 12, 2016
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

No branches or pull requests

2 participants