Hey everyone,
I am just curious what type of security hacks can happen with php enabled in templates. I am not trying to hack an EE site, I am just curious about the types of attacks that can happen with php enabled.
thanks,
Adam
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
June 23, 2008 5:40pm
Subscribe [3]#1 / Jun 23, 2008 5:40pm
Hey everyone,
I am just curious what type of security hacks can happen with php enabled in templates. I am not trying to hack an EE site, I am just curious about the types of attacks that can happen with php enabled.
thanks,
Adam
#2 / Jun 23, 2008 5:49pm
Well, the issue is mainly this: if you allow non-superadmins to edit a template with PHP enabled, they could easily do things that you wouldn’t want them to do, just by using PHP. If your trust you users, this is not much of an issue. But still, a line of PHP would allow them to access the whole database, modify anything in there, from posting a new article to make themselves or other users superadmins.
Moved to General.
#3 / Jun 23, 2008 6:38pm
so if I do not allow anyone but myself to edit templates, then it’s relatively safe to allow php in the templates, correct? That is assuming that the php code itself is safe.
#4 / Jun 23, 2008 6:41pm
Yes, it is. If you do not share template access with anyone, and your code itself is safe, I see no additional risk in allowing PHP.
#5 / Jun 23, 2008 10:41pm
ok thanks Imgmar
#6 / Jun 24, 2008 1:53am
It seems to me that even if you didn’t have PHP enabled… giving users access to the templates is simply a recipe for disaster. Why would you give anyone you didn’t fully trust access to templates? That wouldn’t make any sense.
#7 / Jun 24, 2008 2:02am
I can envision a couple of scenarious where that would make perfect sense. Let a department be in charge of their subsite, eg, including full control over the template, but not the whole companz website. Or ... Lots of possibilities.
#8 / Jun 24, 2008 3:27am
It seems to me that even if you didn’t have PHP enabled… giving users access to the templates is simply a recipe for disaster. Why would you give anyone you didn’t fully trust access to templates? That wouldn’t make any sense.
You could always just as easily restrict access to the most important templates: navigation, footer, sidebar, etc.
And allow them access to their own content templates. Carefully using embeds, you can grant them easy access to edit what they need to edit, without breaking. As long as they follow your instructions, right?!
😊