SA-2008-63 saw a rash of contrib modules that were improperly updated to the new menu system. The fact that we use booleans for indicating access always allowed or never allow turns out to make it easier than it should to make an access bypass by doing a function call to user_access() (for example).
To harden this piece of the core APi going forward, chx proposed and I implemented a minor modification to the menu system to used defined strings rather than booleans.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | access-callback-harden-D7-319360-7.patch | 6.49 KB | pwolanin |
| #5 | access-callback-harden-D7-319360-5a.patch | 5.79 KB | pwolanin |
| #1 | access-callback-harden-D7-319360-1.patch | 1.91 KB | pwolanin |
Comments
Comment #1
pwolanin commentedpretty simple patch.
Comment #2
webchickCould I have a bit more information? How are contrib modules getting this wrong?
Comment #3
dave reidI'm not sure that we should make things a little bit harder when contrib modules can't do access control right. But that's my opinion...
Comment #4
catchPeople are putting
which evaluates as TRUE.
afaik, it doesn't make any more work in contrib, just stops poorly upgraded D5 modules from having access bypasses when they completely ignore how the new menu system works.
Comment #5
pwolanin commentedhere's a patch that actually converts the few uses in core.
All tests pass with this patch: 6884 passes, 0 fails, 0 exceptions
@Dave Reid - this patch should make it harder for contrib to get it wrong, but not at all harder to get it right.
Comment #6
pwolanin commentedlooks like this needs work
Comment #7
pwolanin commentedlooks like the problem was just soe additional items in a test module that the prior patch misses
Comment #8
pwolanin commentedComment #9
moshe weitzman commentedIMO, this is a result of people doing a rushed d5 to d6 upgrade. perhaps coder or deadwood contributed to the problem - i don't know. anyway, the problem is gone with d6 => d7 so i really think this is not very useful. IMO, this is babysitting. I don't feel strongly though.
Comment #10
dries commentedI'm not particularly fond of this patch, to be honest.
Comment #12
webchicksubmitting for re-testing after snafu this afternoon.
Comment #14
marcvangendLooking at the comments and the lack of activity, I guess this is a "won't fix". Correct me if I'm wrong.