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

Blacklist filtering all text inside a function from template #154

Open
st2cs opened this issue May 23, 2014 · 0 comments
Open

Blacklist filtering all text inside a function from template #154

st2cs opened this issue May 23, 2014 · 0 comments

Comments

@st2cs
Copy link

st2cs commented May 23, 2014

The parser, as far as regards functions is doing a blacklist filter in all the function, the name, the content, ... . So some functions that can use words that are listed in the blacklist throw an exception.

Per example, the function gettext is used to do a i18n of the content and may use words like system, unlink,... and will throw the pertinent exception.

The method must filtrate the function name and not his content, i think.
Other problem may be the callback functions, but adding these to the blacklist should be ok to prevent any damage.

So i suggest change the line in the compileTemplate method, in parser class, refered to the function parser from:
$this->blackList($parsedFunction);
to
$this->blackList($function);

Please tell me if im wrong.
Thanks!!! :)

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

1 participant