esac; done
unset cgilite_arg
-_EXEC="${EXEC:-${0%/*}}"
-_DATA="${DATA:-.}"
-_EXEC="${_EXEC%/}" _DATA="${_DATA%/}" _BASE="${BASE%/}"
+_EXEC="${_EXEC:-${0%/*}}"
+_DATA="${_DATA:-.}"
+_EXEC="${_EXEC%/}" _DATA="${_DATA%/}" _BASE="${_BASE%/}"
# Carriare Return and Line Break characters for convenience
CR="\r"
fi
}
+SESSION_COOKIE() {
+ SET_COOKIE 0 session="$SESSION_KEY" Path=/ SameSite=Strict HttpOnly
+}
+
SESSION_KEY="$(update_session)"
-SET_COOKIE 0 session="$SESSION_KEY" Path=/ SameSite=Strict HttpOnly
SESSION_ID="${SESSION_KEY%% *}"
+
+[ "$1" = nocookie ] || SESSION_COOKIE
fi
}
-# STRING='
-# s;\\;\\\\;g; s;\t;\\t;g;
-# s;\n;\\n;g; s;\r;\\r;g;
-# s;\+;\\+;g; s; ;+;g;
-# '
STRING(){
local in out=''
[ $# -gt 0 ] && in="$*" || in="$(cat)"
" "*) out="${out}+"; in="${in# }" ;;
*) out="${out}${in%%[\\${CR}${BR} + ]*}"; in="${in#"${in%%[\\${BR}${CR} + ]*}"}" ;;
esac; done
- printf '%s' "$out"
+ printf '%s' "${out:-\\}"
}
-UNSTRING='
- :UNSTRING_X
- s;((^|[^\\])(\\\\)*)\\n;\1\n;g;
- s;((^|[^\\])(\\\\)*)\\t;\1\t;g;
- s;((^|[^\\])(\\\\)*)\\r;\1\r;g;
- s;((^|[^\\])(\\\\)*)\+;\1 ;g;
- tUNSTRING_X;
- s;((^|[^\\])(\\\\)*)\\\+;\1+;g;
- s;\\\\;\\;g;
-'
UNSTRING(){
local in out=''
[ $# -gt 0 ] && in="$*" || in="$(cat)"
\\*) in="${in#\\}" ;;
*) out="${out}${in%%[\\+]*}"; in="${in#"${in%%[\\+]*}"}" ;;
esac; done
- printf '%s' "$out"
+ printf '%s\n' "$out"
}
DBM() {