In a message dated 12/15/04 6:15:33 PM, [EMAIL PROTECTED] writes:
I'm trying to build a restricted execution environment for ADP pages,
and to make a clean break with the current code base, I want a new
parser for ADP pages for some of my web pages.
Poking through the AOLServer docs, I found this encouraging snippet:
http://www.aolserver.com/docs/devel/c/api/c-ch8.htm#861558
Ns_AdpRegisterParser
Overview
Register a parser for ADPs
[...]
Except, that this promising looking API call has the following
implementation:
int Ns_AdpRegisterParser(char *extension, Ns_AdpParserProc *proc)
{
return NS_ERROR;
}
The new 4.0 API function, ns_register_adp, looks like it might be a
suitable replacement, but it is undocumented:
http://www.aolserver.com/40drafts/tclapi/general.html#ns_register_adp
http://panoptic.com/wiki/aolserver/868@
So, how would I go about implementing a restricted execution environment
for ADP pages in AOLServer 4.x?
Hi,
The parser API has indeed been removed. However, the current parser includes a "safe eval" mode which you can access with "ns_adp_safeeval". I believe it disables <% ... %> but enables registered tags which would allow you to protect and control specific code -- check the latest source for ADP_SAFE flag. Perhaps that will help you out.
-Jim
2">
- [AOLSERVER] Writing custom ADP Parsers Adam Turoff
- Jim Davidson