[BACK]Return to cgi.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/cgi.c between version 1.133 and 1.134

version 1.133, 2016/07/09 19:58:36 version 1.134, 2016/07/10 10:05:33
Line 470  validate_manpath(const struct req *req, const char* ma
Line 470  validate_manpath(const struct req *req, const char* ma
 {  {
         size_t   i;          size_t   i;
   
         if ( ! strcmp(manpath, "mandoc"))  
                 return 1;  
   
         for (i = 0; i < req->psz; i++)          for (i = 0; i < req->psz; i++)
                 if ( ! strcmp(manpath, req->p[i]))                  if ( ! strcmp(manpath, req->p[i]))
                         return 1;                          return 1;
Line 499  pg_index(const struct req *req)
Line 496  pg_index(const struct req *req)
         resp_searchform(req, FOCUS_QUERY);          resp_searchform(req, FOCUS_QUERY);
         printf("<p>\n"          printf("<p>\n"
                "This web interface is documented in the\n"                 "This web interface is documented in the\n"
                "<a href=\"/%s%smandoc/man8/man.cgi.8\">man.cgi</a>\n"                 "<a href=\"/%s%sman.cgi.8\">man.cgi(8)</a>\n"
                "manual, and the\n"                 "manual, and the\n"
                "<a href=\"/%s%smandoc/man1/apropos.1\">apropos</a>\n"                 "<a href=\"/%s%sapropos.1\">apropos(1)</a>\n"
                "manual explains the query syntax.\n"                 "manual explains the query syntax.\n"
                "</p>\n",                 "</p>\n",
                scriptname, *scriptname == '\0' ? "" : "/",                 scriptname, *scriptname == '\0' ? "" : "/",
Line 884  pg_show(struct req *req, const char *fullpath)
Line 881  pg_show(struct req *req, const char *fullpath)
                 free(manpath);                  free(manpath);
                 return;                  return;
         }          }
           free(manpath);
         if (strcmp(manpath, "mandoc")) {  
                 free(req->q.manpath);  
                 req->q.manpath = manpath;  
         } else  
                 free(manpath);  
   
         if ( ! validate_filename(file)) {          if ( ! validate_filename(file)) {
                 pg_error_badrequest(                  pg_error_badrequest(

Legend:
Removed from v.1.133  
changed lines
  Added in v.1.134

CVSweb