aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortenox <as@tenoware.com>2016-08-22 01:55:24 -0700
committertenox <as@tenoware.com>2016-08-22 01:55:24 -0700
commitf4008b90837d0dbdcba11631a0b5b2f85eae39a9 (patch)
tree46dd0fd157b7af1713a1232677c12f1ba411956f
parent056aa6cc742e8b107d6b1e0d279fc4a7bd34b667 (diff)
downloadwfm-f4008b90837d0dbdcba11631a0b5b2f85eae39a9.tar.gz
user agent js fixes
-rw-r--r--wfm.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/wfm.c b/wfm.c
index 4d546c1..14a40e8 100644
--- a/wfm.c
+++ b/wfm.c
@@ -442,14 +442,12 @@ int cgiMain(void) {
checkdirectory();
// JavaScript check
- if(strncmp(cgiUserAgent, "Mozilla/5", 9)==0)
- js=2;
- else if(strncmp(cgiUserAgent, "Mozilla/4.0 (compatible; MSIE 6", 31)==0)
- js=2;
- else if(strncmp(cgiUserAgent, "Mozilla/4", 9)==0)
- js=1;
- else
- js=0;
+ if(strncmp(cgiUserAgent, "Mozilla/5", 9)==0) js=2;
+ else if(strncmp(cgiUserAgent, "Mozilla/4.0 (compatible; MSIE 6", 31)==0) js=2;
+ else if(strncmp(cgiUserAgent, "Mozilla/4.0 (compatible; MSIE 7", 31)==0) js=2;
+ else if(strncmp(cgiUserAgent, "Mozilla/4.0 (compatible; MSIE 8", 31)==0) js=2;
+ else if(strncmp(cgiUserAgent, "Mozilla/4", 9)==0) js=1;
+ else js=0;
// main routine - regular actions
cgiFormStringNoNewlines("action", action, sizeof(action));
@@ -457,7 +455,7 @@ int cgiMain(void) {
else if(cgiFormSubmitClicked("multi_delete_prompt")==cgiFormSuccess && access_level >= PERM_RO) multiprompt_ui("delete");
else if(cgiFormSubmitClicked("multi_delete_prompt.x")==cgiFormSuccess && access_level >= PERM_RO) multiprompt_ui("delete");
else if(cgiFormSubmitClicked("multi_move_prompt")==cgiFormSuccess && access_level >= PERM_RO) multiprompt_ui("move");
- else if(cgiFormSubmitClicked("multi_move_prompt.x")==cgiFormSuccess && access_level >= PERM_RO) multiprompt_ui("move");
+ else if(cgiFormSubmitClicked("multi_move_prompt.x")==cgiFormSuccess && access_level >= PERM_RO) multiprompt_ui("move");
else if(cgiFormSubmitClicked("upload")==cgiFormSuccess && access_level >= PERM_RW) receivefile();
else if(strcmp(action, "sendfile")==0 && access_level >= PERM_RO) sendfile();
else if(strcmp(action, "delete")==0 && access_level >= PERM_RW) delete();