Forum Moderators: coopster

Message Too Old, No Replies

Preventing php scripts from running on certain pages

         

cynikalsam

8:29 pm on Jan 4, 2005 (gmt 0)

10+ Year Member



I host a blog on my site which allows users to customize their layout by editing the HTML code. The problem is, php will also work, and thats not good for security. As it is now, users must request this feature, so im safe for now, but i'd like to enable this for all users without worrying about security.

Is there a way i can prevent php scripts from being executed on these pages?

If it matters, im running apache/linux.

coopster

11:30 am on Jan 5, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



As always, edit/validate the user input. You could use a regular expression [php.net] to peel out any php code (or javascript) or whatever else you see as potential security issues.