fixed: dots in url-es (now only one dot is available in the whole name and it cannot be only one dot ".")
added: cmslu can act as an authorizer (fast cgi authorize role) added: Item::static_auth we can have additional static content on the file system this content is authorized through cmslu (fastcgi authorizer mode) changed: some changes in config changed: the way how the www server is using cmslu added new virtuals: static static_auth changed: cmslu returns correct http headers (200, 404, 403) changed: in cookie parser: we get the last cookie (if the server has more than one cookie with the same name) git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@540 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -107,15 +107,31 @@ void Content::SetDefaultFunction()
|
||||
|
||||
void Content::MakeStandardFunction()
|
||||
{
|
||||
if( request.role == Request::authorizer )
|
||||
{
|
||||
// in authorizer mode only cat function is available
|
||||
// (and must be default)
|
||||
|
||||
if( request.pfunction )
|
||||
{
|
||||
request.status = Error::db_no_item;
|
||||
log << log1 << "Content: in authorizer mode only 'cat' funtion is available and must "
|
||||
"be default (not in the url)" << logend;
|
||||
return;
|
||||
}
|
||||
|
||||
request.pfunction = data.functions.GetFunction(FUN_CAT);
|
||||
}
|
||||
|
||||
if( !request.pfunction )
|
||||
SetDefaultFunction();
|
||||
|
||||
if( !request.redirect_to.empty() )
|
||||
return;
|
||||
|
||||
|
||||
if( !request.pfunction )
|
||||
{
|
||||
request.status = Error::no_function;
|
||||
log << log1 << "Content: no function (neither cat nor ls)" << logend;
|
||||
return;
|
||||
}
|
||||
@@ -176,17 +192,22 @@ void Content::MakeStandardFunction()
|
||||
|
||||
void Content::MakePost()
|
||||
{
|
||||
if( request.role == Request::authorizer )
|
||||
{
|
||||
request.status = Error::permision_denied;
|
||||
return;
|
||||
}
|
||||
|
||||
if( !request.pfunction )
|
||||
SetDefaultFunction();
|
||||
|
||||
if( !request.pfunction )
|
||||
{
|
||||
log << log1 << "Content: MakePost: no function" << logend;
|
||||
request.status = Error::no_function;
|
||||
log << log1 << "Content: MakePost: no function" << logend;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
switch( request.pfunction->code )
|
||||
{
|
||||
case FUN_RUN:
|
||||
@@ -355,7 +376,7 @@ void Content::PrepareUrl(Item & item)
|
||||
if( item.url.empty() )
|
||||
item.url = item.subject; // if the subject is empty then the url will be corrected by CorrectUrl()
|
||||
|
||||
CorrectUrl(item);
|
||||
CorrectUrlOnlyAllowedChar(item.url);
|
||||
|
||||
if( data.functions.GetFunction(item.url) )
|
||||
{
|
||||
|
Reference in New Issue
Block a user