}
}
- if (strstr(file,"..")) {
- cgi_setup_error("404 File Not Found","",
- "Relative paths not allowed");
- }
-
if (!file_exist(file, &st)) {
cgi_setup_error("404 File Not Found","",
"The requested file was not found");
printf("<option value=\" \"> \n");
for (i=0;i<lp_numservices();i++) {
s = lp_servicename(i);
- if (s && (*s) && strcmp(s,"IPC$")) {
+ if (s && (*s) && strcmp(s,"IPC$") && !lp_print_ok(i)) {
printf("<option %s value=\"%s\">%s\n",
(share && strcmp(share,s)==0)?"SELECTED":"",
s, s);
}
}
- if (strstr(file,"..")) {
- cgi_setup_error("404 File Not Found","",
- "Relative paths not allowed");
- }
-
if (!file_exist(file, &st)) {
cgi_setup_error("404 File Not Found","",
"The requested file was not found");
printf("<option value=\" \"> \n");
for (i=0;i<lp_numservices();i++) {
s = lp_servicename(i);
- if (s && (*s) && strcmp(s,"IPC$")) {
+ if (s && (*s) && strcmp(s,"IPC$") && !lp_print_ok(i)) {
printf("<option %s value=\"%s\">%s\n",
(share && strcmp(share,s)==0)?"SELECTED":"",
s, s);