diff options
| -rw-r--r-- | .gitignore | 4 | ||||
| -rw-r--r-- | blob/nginx_rewrite_rules | 1 | ||||
| -rw-r--r-- | www/functions.php | 10 |
3 files changed, 10 insertions, 5 deletions
@@ -2,4 +2,8 @@ *.sqlite *~ *.swp +upl.php +gitpull* tmp/ +files/ +favicon.ico diff --git a/blob/nginx_rewrite_rules b/blob/nginx_rewrite_rules index b35bece..662362c 100644 --- a/blob/nginx_rewrite_rules +++ b/blob/nginx_rewrite_rules @@ -2,6 +2,7 @@ location /robots.txt {} #stop rewriting the robots.txt location /favicon.ico {} location ~* ^/.+[^/].+\.css {} +location ~* ^/.+[^/].+\.png {} location ~* ^/?login(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ { rewrite ^/?login(\?[0-9a-zA-Z]*(=[0-9a-zA-Z]*)?)? /index.php?task=login&arguments=$1 last; diff --git a/www/functions.php b/www/functions.php index 46b3149..d0d848e 100644 --- a/www/functions.php +++ b/www/functions.php @@ -41,16 +41,16 @@ function login($db){ COMMIT; ")){ - $_SESSION["login"] = true; - $_SESSION["username"] = "$unsafe_username"; + $_SESSION["login"] = true; + $_SESSION["username"] = "$unsafe_username"; - header("Refresh: 0; /"); + header("Refresh: 0; /"); } else { - header("Refresh: 0; login?reason=database"); + header("Refresh: 0; login?reason=database&username=" . $unsafe_username); } } else { - header("Refresh: 0; login?reason=failure"); + header("Refresh: 0; login?reason=failure&username=" . $unsafe_username); } } else { |
