Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/RMerl/asuswrt-merlin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sauvageau <rmerl@lostrealm.ca>2018-04-01 02:55:15 +0300
committerEric Sauvageau <rmerl@lostrealm.ca>2018-04-01 02:55:32 +0300
commit68c4f8edbcad94cff56727ef766c6a7c8079af0a (patch)
tree00d7ea5c63940aa6ed837ea55d9c8b440dc2514d /release
parenteb56d07c8ecce72d160adbb75e515cbe1edb63b4 (diff)
httpd: security backport in ej_dump() from 380_8228
Diffstat (limited to 'release')
-rw-r--r--release/src/router/httpd/web.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/release/src/router/httpd/web.c b/release/src/router/httpd/web.c
index d9d7d7251d..db6e4a21fd 100644
--- a/release/src/router/httpd/web.c
+++ b/release/src/router/httpd/web.c
@@ -1203,7 +1203,7 @@ ej_dump(int eid, webs_t wp, int argc, char_t **argv)
//csprintf("Script : %s, File: %s\n", script, file);
// run scrip first to update some status
- if (strcmp(script,"")!=0) sys_script(script);
+ if (strcmp(script,"syscmd.sh")==0) sys_script(script);
if (strcmp(file, "wlan11b.log")==0)
return (ej_wl_status(eid, wp, 0, NULL, 0)); /* FIXME */
@@ -1232,14 +1232,6 @@ ej_dump(int eid, webs_t wp, int argc, char_t **argv)
return wl_wps_info(eid, wp, argc, argv, nvram_get_int("wps_band_x"));
#endif
}
-#if 0
- else if (strcmp(file, "apselect.log")==0)
- return (ej_getSiteSurvey(eid, wp, 0, NULL));
- else if (strcmp(file, "apscan")==0)
- return (ej_SiteSurvey(eid, wp, 0, NULL));
- else if (strcmp(file, "urelease")==0)
- return (ej_urelease(eid, wp, 0, NULL));
-#endif
ret = 0;
@@ -1350,7 +1342,23 @@ ej_dump(int eid, webs_t wp, int argc, char_t **argv)
}
#endif /* RTCONFIG_DSL */
#endif /* RTCONFIG_PUSH_EMAIL */
- else {
+ else if (strcmp(file, "connect.log")==0) {
+ sprintf(filename, "/tmp/%s", file);
+ system("/usr/sbin/netstat-nat -r state -xn > /tmp/connect.log 2>&1");
+ ret += dump_file(wp, filename);
+ }
+ else if ( strcmp(file, "syscmd.log")==0
+ || strcmp(file, "pptp_connected")==0
+ || strcmp(file, "release_note0.txt")==0
+ || strcmp(file, "release_note1.txt")==0
+ || strcmp(file, "release_note.txt")==0
+#ifdef RTCONFIG_DSL
+ || strcmp(file, "adsl/tc_fw_ver_short.txt")==0
+ || strcmp(file, "adsl/tc_ras_ver.txt")==0
+ || strcmp(file, "adsl/tc_fw_ver.txt")==0
+ || strcmp(file, "adsl/adsllog.log")==0
+#endif
+ ){
sprintf(filename, "/tmp/%s", file);
ret += dump_file(wp, filename);
}