Closed (won't fix)
Project:
Drupal core
Version:
4.6.0
Component:
system.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2005 at 21:58 UTC
Updated:
26 Jan 2006 at 06:42 UTC
i've seen that system_settings_save() is storing everything from $_POST['edit'] with variable_set without doing any checks.
so this bypasses the permissions which the administrator can set through the access controls, because he is able to edit all settings once he has access an admin-page.
so users with access to one of
have in the end access to all of them
i think this doesn't matter for most sites - however it makes at least this controls redundant.
Comments
Comment #1
moshe weitzman commentedComment #2
moshe weitzman commentedthis is fixed by form api, and thus only available in HEAD.
Comment #3
chx commentedWhile technically it is a problem that someone can set any variables, I fail to see how this leads to privilege escalation.That kind of stuff is not stored in variables.
Comment #4
fagoyes.
however the availability of this separate settings makes the impression that they can be set distinct of another - what isn't really the case.
Comment #5
dopry commentedsystem_settings_save does not bypass access control. It does not enforce it. Getting to the admin/settings requires administer site settings permissions, enforced by the menu, and should be sufficient. If another module is implementing system_settings_save in an insecure manner, a bug should be filed against that module. If the documentation is unclear a bug should be filed against the documentation.
Comment #6
chx commentedwhat's more, in Drupal 4.7 it's only saving what's shown on the page so this is rather 'fixed' than won't fix , but anyways it's not an issue any more.