Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Security
ok, i've finally found the time to take this little beast for a ride
first off, nice job, installation was painless.
one detail is in urgent need for some polish, though:
vanilla, like any other php-script, should not *ever* write under it's own
document-root and consequently shouldn't have write-access there.
suggestions like "chmod 666" in the installation manual are very bad.
instead:
1. state'n'stuff that vanilla only needs internally should go under /var/tmp or /var/state
2. dynamic stuff that must be served by the webserver (avatars or somesuch?)
should go under a single dedicated directory which should be separate
from the vanilla tree (where the php files live). it should not be a
subdirectory in the vanilla tree.
the latter directory must be protected in the apache.conf via Options NoExec etc.
and vanilla should *verify* that no scripts can be executed from any writable
directory (e.g. by writing a small php-script that triggers an alert if it gets executed and have a "test-security" button in the admin interface point to it... or something like that...).
you don't want small bugs to turn into security holes, do you?
ps: after editing this post 5 times or so... what was the reason for not having preview in the core again?
first off, nice job, installation was painless.
one detail is in urgent need for some polish, though:
vanilla, like any other php-script, should not *ever* write under it's own
document-root and consequently shouldn't have write-access there.
suggestions like "chmod 666" in the installation manual are very bad.
instead:
1. state'n'stuff that vanilla only needs internally should go under /var/tmp or /var/state
2. dynamic stuff that must be served by the webserver (avatars or somesuch?)
should go under a single dedicated directory which should be separate
from the vanilla tree (where the php files live). it should not be a
subdirectory in the vanilla tree.
the latter directory must be protected in the apache.conf via Options NoExec etc.
and vanilla should *verify* that no scripts can be executed from any writable
directory (e.g. by writing a small php-script that triggers an alert if it gets executed and have a "test-security" button in the admin interface point to it... or something like that...).
you don't want small bugs to turn into security holes, do you?
ps: after editing this post 5 times or so... what was the reason for not having preview in the core again?
0
Comments
The problem is not with what these files are supposed to contain, the problem is what a malicious user could make vanilla (or PHP) write there.
Never have your webapp write to *any* executable location.
ps: and configuration and settings should ofcourse live in the database!
then they don't have the option (luxury) to move the writtable foldersoutside of the web accessable directory.
i think generally you can always have two directories under your public_html and use a custom .htaccess to secure them? not luxury, standard apache mechanism!
I have found no security problems (major ones) have you? Unless you write an extension that opens one up, I see no problems at the moment.
PHP can't be executed within a vanilla comment can it? Don't think so.
There will be security problems. The extensions codebase is not under mark's control so a loosely written extension may very well open doors even if the core is safe. PHP has had its share of own security problems, too.
The question is not whether it happens but how much impact it causes when it happens.
None taken!
3. do not rewrite your own config files, store config data in the database
There is absolutely no way I am going to load these settings (which are practically constants) from the database. I've said it before and I'll say it again, the biggest hole for performance loss is in database queries. I use as few queries as possible in Vanilla and I plan on keeping it that way. Worst case scenario: I remove the application settings form and make the users edit their settings.php file manually.
PHP can't be executed within a vanilla comment can it?
No.
The extensions codebase is not under mark's control so a loosely written extension may very well open doors even if the core is safe.
That is my biggest concern with extensions.
Well, if you think about that in the context of the community setting, it is as much our fault as it is theirs if that extension is linked here as well. But yeah, it's the admins fault for installing it in the first place, and the writers responsibility for maintaining security in mind. If it's some undisclosed extension we don't know about, then yeah, it's totally the users fault.
well, it's a matter of attitude but i think if you expect many of your users to be less tech savvy then it would be wise to implement all possible security precautions.
if vanilla ever gets compromised (through extensions or not) then it gets a bad name. well, actually it is then considered equal to almost any other forum package out there. just google for "$your_fav_forum_name exploit" and count the bugtraq listings per product. it's not funny anymore...
the other thing is that currently i cannot easily audit vanilla because of this gaping hole. if vanilla didn't have write-permission to exec'able directories then i'd only have to grep for exec() and other dangerous php functions and know i'm safe if they don't show up in the codebase.
but since vanilla *can* write to exec'able dirs code-injection is possible and
my codebase is potentially much larger than i would like
@mark
There is absolutely no way I am going to load these settings (which are practically constants) from the database. I've said it before and I'll say it again, the biggest hole for performance loss is in database queries.
hummm. doesn't php know runtime static vars?
in other languages you would basically fetch the values from the db once (on startup or first hit) and then have them in memory. when they are changed you flush the changes to the db.
i'm ofcourse not proposing to fetch them on every hit!