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
|
#! /bin/bash
|
||||||
|
|
||||||
# Lese den request
|
# Lese den request
|
||||||
read $header
|
read header
|
||||||
|
|
||||||
# Verarbeite den request
|
# Verarbeite den request
|
||||||
URL="${header#GET }"
|
URL="${header#GET }"
|
||||||
URL="${URL% HTTP/*}"
|
URL="${URL% HTTP/*}"
|
||||||
export FILE="$FILES$URL"
|
export FILE="$FILES$URL"
|
||||||
echo $URL
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
# Blockiere Versuche, das restliche Dateisystem zu lesen
|
# Blockiere Versuche, das restliche Dateisystem zu lesen
|
||||||
if [ "$URL" = "*..*" ]; then
|
if [[ "$URL" == *..* ]]; then
|
||||||
export URL='/'
|
export URL='/'
|
||||||
export FILE="$FILES"
|
export FILE="$FILES"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verhindere "/"-bug
|
# Verhindere "/"-bug
|
||||||
if [ -d "$FILE" -a "$FILE" != "*/" ]; then
|
if [ -d "$FILE" ]; then
|
||||||
newURL="$URL"'/'
|
newURL="$URL"'/'
|
||||||
export URL="$newURL"
|
export URL="$newURL"
|
||||||
newFILE="$FILE"'/'
|
newFILE="$FILE"'/'
|
||||||
|
|
Loading…
Add table
Reference in a new issue