summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot2014-03-10 20:58:31 +0100
committerroot2014-03-10 20:58:31 +0100
commit59c4147bbec43622c0cc696fbb3dfe6a67f5d4b6 (patch)
tree271ab400ad38683895acfb79e01267c95170b884
parentd8c0d3f8c5229147809d543fb59b1968e9824b59 (diff)
downloadfiles.iamfabulous.de-59c4147bbec43622c0cc696fbb3dfe6a67f5d4b6.tar.gz
stuff
-rw-r--r--.gitignore4
-rw-r--r--blob/nginx_rewrite_rules1
-rw-r--r--www/functions.php10
3 files changed, 10 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 8bf3666..7bdc49b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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 {