mirror of
https://gitlab.com/niansa/simpsh-httpd.git
synced 2025-03-06 20:53:36 +01:00
Add files via upload
This commit is contained in:
parent
8d915494f4
commit
b9228a0105
2 changed files with 3 additions and 4 deletions
|
@ -1,10 +1,9 @@
|
|||
#! /bin/bash
|
||||
|
||||
# Lese den request
|
||||
read $header
|
||||
read header
|
||||
|
||||
# Verarbeite den request
|
||||
URL="${header#GET }"
|
||||
URL="${URL% HTTP/*}"
|
||||
export FILE="$FILES$URL"
|
||||
echo $URL
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#! /bin/bash
|
||||
|
||||
# Blockiere Versuche, das restliche Dateisystem zu lesen
|
||||
if [ "$URL" = "*..*" ]; then
|
||||
if [[ "$URL" == *..* ]]; then
|
||||
export URL='/'
|
||||
export FILE="$FILES"
|
||||
fi
|
||||
|
||||
# Verhindere "/"-bug
|
||||
if [ -d "$FILE" -a "$FILE" != "*/" ]; then
|
||||
if [ -d "$FILE" ]; then
|
||||
newURL="$URL"'/'
|
||||
export URL="$newURL"
|
||||
newFILE="$FILE"'/'
|
||||
|
|
Loading…
Add table
Reference in a new issue