X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=index.cgi;h=dac2f6b2898ac9cee16fc1faef658872593ccf54;hb=00e50150182e985dde641f59cc314d240245b4e9;hp=e794d138f3ca905b0d1429ebfd5c2ab1fe62aac8;hpb=62c3d9c54dec22772956bea9f2ec482c891e511e;p=busy diff --git a/index.cgi b/index.cgi index e794d13..dac2f6b 100755 --- a/index.cgi +++ b/index.cgi @@ -18,16 +18,15 @@ umask=002 alias _wiki="stx2any --no-template --link-abbrevs --quote -T html" +. auth/acl.sh page=$(egrep -o '(^|&)p=[a-zA-Z0-9/_-]+(&|$)' <<<"${QUERY_STRING}" |sed 's,&,,g;s,p=,,') [ -z "$LOGIN" ] && LOGIN=false -[ -z "$DEV" ] && DEV=false -[ -z "$ADM" ] && ADM=false [ -z "$page" ] && page=Home if (! $LOGIN && egrep -qx "https?://${HTTP_HOST}/(session.cgi\?|write/).*" <<<"${HTTP_REFERER}"); then - echo -n "Location: http://${HTTP_HOST}/session.cgi?${QUERY_STRING}\n\n" + echo -n "Location: https://${HTTP_HOST}/session.cgi?${QUERY_STRING}\n\n" exit 0 fi @@ -39,9 +38,10 @@ cat < - Busy + $(sed -rn 's:^name=(.*)$:\1:p' project.meta) - Busy + $([ -r "${page}.css" ] && echo '')