diff options
Diffstat (limited to 'networking')
-rw-r--r-- | networking/httpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 383a00635..8c5e29fa8 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1125,7 +1125,7 @@ static int sendCgi(const char *url, | |||
1125 | setenv1("HTTP_REFERER", referer); | 1125 | setenv1("HTTP_REFERER", referer); |
1126 | 1126 | ||
1127 | /* set execve argp[0] without path */ | 1127 | /* set execve argp[0] without path */ |
1128 | argp[0] = strrchr(purl, '/') + 1; | 1128 | argp[0] = (char*)bb_basename(purl); |
1129 | /* but script argp[0] must have absolute path and chdiring to this */ | 1129 | /* but script argp[0] must have absolute path and chdiring to this */ |
1130 | script = strrchr(fullpath, '/'); | 1130 | script = strrchr(fullpath, '/'); |
1131 | if (!script) | 1131 | if (!script) |
@@ -1713,7 +1713,7 @@ static void handleIncoming(void) | |||
1713 | if (alarm_signaled) | 1713 | if (alarm_signaled) |
1714 | break; | 1714 | break; |
1715 | 1715 | ||
1716 | if (strcmp(strrchr(url, '/') + 1, httpd_conf) == 0 || ip_allowed == 0) { | 1716 | if (strcmp(bb_basename(url), httpd_conf) == 0 || ip_allowed == 0) { |
1717 | /* protect listing [/path]/httpd_conf or IP deny */ | 1717 | /* protect listing [/path]/httpd_conf or IP deny */ |
1718 | #if ENABLE_FEATURE_HTTPD_CGI | 1718 | #if ENABLE_FEATURE_HTTPD_CGI |
1719 | FORBIDDEN: /* protect listing /cgi-bin */ | 1719 | FORBIDDEN: /* protect listing /cgi-bin */ |