Security Checks in API functions
| Newsgroups | gmane.comp.cms.xaraya.devel |
|---|---|
| Organization | Xaraya |
| Message-ID | <[email protected]> |
Do we really need them? Xaraya makes heavy use of security checks, and since they result in performance hits we need ot try and reduce them where redundant or unnecessary. API functions are always called by something else, so the idea presents itself: why not relegate security checking to whatever calls the API function in the first place? Typical case of such calls is an update GUI function which does input checking and then delegates the actual update to an API function. The GUI function could just as easily do privilege checking, and often does anyway. Of course there are exception cases, for instance API functions that create content for display, like the getmenulinks functions. There is also the question of what happens when one API function calls another, and so on. Still, it seems to me that taking the removal of security checks as a starting point and then dealing with the exception situations as they present themselves may be a useful approach to reducing the number of unnecessary checks. Opinions? Marc