I want to set "Allow php in templates" to 'yes' in admin, because I want to add banners besides my forum (in overal_header.html)
However, I read on several places that setting "Allow php in templates" to yes is discouraged, and that there might me a security issue.
Now my question is: is this true?
And, if there is a risk, why isn't there a way on enabling php ONLY in overal_header.html and overal_header.html? (since this the place where an end user wants to include custom files)
Thank you pit$bull.
Is there anyone from the phpbb3-development community who can confirm this,
or are you yourself a phpbb3-developer?
I think that there are a lot of people with this question!
Best regards Jaap
Enabling the 'allow php in templates' option is not a security risk per-se, but it is discouragedfor a number of reasons.
We want to prevent MOD authors from making MODs that put PHP code into templates. The whole point of templates is to separate output from business logic. This means separating the PHP code from the HTML.
Users can mis-use this feature and mindlessly copy-paste scripts into their templates. Lots of the scripts out there have major security issues.
By encouraging users to use MODs from the customisation database, we can make sure they get secure code, because we review everything thoroughly before it is accepted.
You can still enable the feature, and if you know what you're doing, it can be convenient. But it is discouraged.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
Hi igorw, thanks for the clarification.
So, to conclude: if my php-includes are safe by themselves, and do not interfere with phpbb,
it is ok to do, to customize one specific phpbb application?
Best regards,
Jaap