function "wiki" of index.sh returned with an error.')
X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=themes%2Fdefault.sh;h=3c5f2a1819a000277c06dc31451a2013f1335812;hb=a813ef1a99c1fac2ae7aaa5711622e58f4eb16e6;hp=1830e26673ccd60c29e95a85f446143cce3dd18c;hpb=ee0162b0ee46d258908de998cfa220edb4074d96;p=shellwiki diff --git a/themes/default.sh b/themes/default.sh index 1830e26..3c5f2a1 100755 --- a/themes/default.sh +++ b/themes/default.sh @@ -22,6 +22,14 @@ theme_page(){ local page="$1" title title="${page%/}"; title="${title##*/}" + if [ ! "$(mdfile "$page")" ]; then + theme_error 404 + return 0 + elif ! acl_read "$page"; then + theme_error 403 + return 0 + fi + # Important! Web Server response including newline printf "%s\r\n" "Content-Type: text/html; charset=utf-8" "" @@ -33,12 +41,14 @@ theme_page(){
$(theme_header)