Fossil SCM
Show the complete CGI environment in the error log on a 418 hack attempt error.
Commit
0204f4aab5acb39bac06a24e2b50d6a7ca938a657652f551e2393ece46f7b25d
Parent
2afff83e7eb608f…
5 files changed
+1
-1
+21
-9
+2
-2
+19
-7
+2
-2
+1
-1
| --- src/alerts.c | ||
| +++ src/alerts.c | ||
| @@ -3475,11 +3475,11 @@ | ||
| 3475 | 3475 | style_set_current_feature("alerts"); |
| 3476 | 3476 | if( fossil_strcmp(P("name"),"test1")==0 ){ |
| 3477 | 3477 | /* Visit the /announce/test1 page to see the CGI variables */ |
| 3478 | 3478 | zAction = "announce/test1"; |
| 3479 | 3479 | @ <p style='border: 1px solid black; padding: 1ex;'> |
| 3480 | - cgi_print_all(0, 0); | |
| 3480 | + cgi_print_all(0, 0, 0); | |
| 3481 | 3481 | @ </p> |
| 3482 | 3482 | }else if( P("submit")!=0 && cgi_csrf_safe(1) ){ |
| 3483 | 3483 | char *zErr = alert_send_announcement(); |
| 3484 | 3484 | style_header("Announcement Sent"); |
| 3485 | 3485 | if( zErr ){ |
| 3486 | 3486 |
| --- src/alerts.c | |
| +++ src/alerts.c | |
| @@ -3475,11 +3475,11 @@ | |
| 3475 | style_set_current_feature("alerts"); |
| 3476 | if( fossil_strcmp(P("name"),"test1")==0 ){ |
| 3477 | /* Visit the /announce/test1 page to see the CGI variables */ |
| 3478 | zAction = "announce/test1"; |
| 3479 | @ <p style='border: 1px solid black; padding: 1ex;'> |
| 3480 | cgi_print_all(0, 0); |
| 3481 | @ </p> |
| 3482 | }else if( P("submit")!=0 && cgi_csrf_safe(1) ){ |
| 3483 | char *zErr = alert_send_announcement(); |
| 3484 | style_header("Announcement Sent"); |
| 3485 | if( zErr ){ |
| 3486 |
| --- src/alerts.c | |
| +++ src/alerts.c | |
| @@ -3475,11 +3475,11 @@ | |
| 3475 | style_set_current_feature("alerts"); |
| 3476 | if( fossil_strcmp(P("name"),"test1")==0 ){ |
| 3477 | /* Visit the /announce/test1 page to see the CGI variables */ |
| 3478 | zAction = "announce/test1"; |
| 3479 | @ <p style='border: 1px solid black; padding: 1ex;'> |
| 3480 | cgi_print_all(0, 0, 0); |
| 3481 | @ </p> |
| 3482 | }else if( P("submit")!=0 && cgi_csrf_safe(1) ){ |
| 3483 | char *zErr = alert_send_announcement(); |
| 3484 | style_header("Announcement Sent"); |
| 3485 | if( zErr ){ |
| 3486 |
+21
-9
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -1549,11 +1549,11 @@ | ||
| 1549 | 1549 | @ contact the Fossil developers on the Fossil-SCM Forum. Type |
| 1550 | 1550 | @ "fossil-scm forum" into any search engine to locate the Fossil-SCM Forum. |
| 1551 | 1551 | style_finish_page(); |
| 1552 | 1552 | cgi_set_status(418,"I'm a teapot"); |
| 1553 | 1553 | cgi_reply(); |
| 1554 | - fossil_errorlog("possible hack attempt - 418 response on \"%s\"", zName); | |
| 1554 | + fossil_errorlog("Xpossible hack attempt - 418 response on \"%s\"", zName); | |
| 1555 | 1555 | exit(0); |
| 1556 | 1556 | } |
| 1557 | 1557 | |
| 1558 | 1558 | /* |
| 1559 | 1559 | ** If looks_like_sql_injection() returns true for the given string, calls |
| @@ -1759,33 +1759,45 @@ | ||
| 1759 | 1759 | ** Omit the values of the cookies unless showAll is true. |
| 1760 | 1760 | ** |
| 1761 | 1761 | ** The eDest parameter determines where the output is shown: |
| 1762 | 1762 | ** |
| 1763 | 1763 | ** eDest==0: Rendering as HTML into the CGI reply |
| 1764 | -** eDest==1: Written to stderr | |
| 1764 | +** eDest==1: Written to fossil_trace | |
| 1765 | 1765 | ** eDest==2: Written to cgi_debug |
| 1766 | +** eDest==3: Written to out (Used only by fossil_errorlog()) | |
| 1766 | 1767 | */ |
| 1767 | -void cgi_print_all(int showAll, unsigned int eDest){ | |
| 1768 | +void cgi_print_all(int showAll, unsigned int eDest, FILE *out){ | |
| 1768 | 1769 | int i; |
| 1769 | 1770 | cgi_parameter("",""); /* Force the parameters into sorted order */ |
| 1770 | 1771 | for(i=0; i<nUsedQP; i++){ |
| 1771 | 1772 | const char *zName = aParamQP[i].zName; |
| 1772 | - if( !showAll ){ | |
| 1773 | - if( fossil_stricmp("HTTP_COOKIE",zName)==0 ) continue; | |
| 1774 | - if( fossil_strnicmp("fossil-",zName,7)==0 ) continue; | |
| 1773 | + const char *zValue = aParamQP[i].zValue; | |
| 1774 | + if( fossil_stricmp("HTTP_COOKIE",zName)==0 | |
| 1775 | + || fossil_strnicmp("fossil-",zName,7)==0 | |
| 1776 | + ){ | |
| 1777 | + if( !showAll ) continue; | |
| 1778 | + if( eDest==3 ) zValue = "..."; | |
| 1775 | 1779 | } |
| 1776 | 1780 | switch( eDest ){ |
| 1777 | 1781 | case 0: { |
| 1778 | - cgi_printf("%h = %h <br>\n", zName, aParamQP[i].zValue); | |
| 1782 | + cgi_printf("%h = %h <br>\n", zName, zValue); | |
| 1779 | 1783 | break; |
| 1780 | 1784 | } |
| 1781 | 1785 | case 1: { |
| 1782 | - fossil_trace("%s = %s\n", zName, aParamQP[i].zValue); | |
| 1786 | + fossil_trace("%s = %s\n", zName, zValue); | |
| 1783 | 1787 | break; |
| 1784 | 1788 | } |
| 1785 | 1789 | case 2: { |
| 1786 | - cgi_debug("%s = %s\n", zName, aParamQP[i].zValue); | |
| 1790 | + cgi_debug("%s = %s\n", zName, zValue); | |
| 1791 | + break; | |
| 1792 | + } | |
| 1793 | + case 3: { | |
| 1794 | + if( strlen(zValue)>100 ){ | |
| 1795 | + fprintf(out,"%s = %.100s...\n", zName, zValue); | |
| 1796 | + }else{ | |
| 1797 | + fprintf(out,"%s = %s\n", zName, zValue); | |
| 1798 | + } | |
| 1787 | 1799 | break; |
| 1788 | 1800 | } |
| 1789 | 1801 | } |
| 1790 | 1802 | } |
| 1791 | 1803 | } |
| 1792 | 1804 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1549,11 +1549,11 @@ | |
| 1549 | @ contact the Fossil developers on the Fossil-SCM Forum. Type |
| 1550 | @ "fossil-scm forum" into any search engine to locate the Fossil-SCM Forum. |
| 1551 | style_finish_page(); |
| 1552 | cgi_set_status(418,"I'm a teapot"); |
| 1553 | cgi_reply(); |
| 1554 | fossil_errorlog("possible hack attempt - 418 response on \"%s\"", zName); |
| 1555 | exit(0); |
| 1556 | } |
| 1557 | |
| 1558 | /* |
| 1559 | ** If looks_like_sql_injection() returns true for the given string, calls |
| @@ -1759,33 +1759,45 @@ | |
| 1759 | ** Omit the values of the cookies unless showAll is true. |
| 1760 | ** |
| 1761 | ** The eDest parameter determines where the output is shown: |
| 1762 | ** |
| 1763 | ** eDest==0: Rendering as HTML into the CGI reply |
| 1764 | ** eDest==1: Written to stderr |
| 1765 | ** eDest==2: Written to cgi_debug |
| 1766 | */ |
| 1767 | void cgi_print_all(int showAll, unsigned int eDest){ |
| 1768 | int i; |
| 1769 | cgi_parameter("",""); /* Force the parameters into sorted order */ |
| 1770 | for(i=0; i<nUsedQP; i++){ |
| 1771 | const char *zName = aParamQP[i].zName; |
| 1772 | if( !showAll ){ |
| 1773 | if( fossil_stricmp("HTTP_COOKIE",zName)==0 ) continue; |
| 1774 | if( fossil_strnicmp("fossil-",zName,7)==0 ) continue; |
| 1775 | } |
| 1776 | switch( eDest ){ |
| 1777 | case 0: { |
| 1778 | cgi_printf("%h = %h <br>\n", zName, aParamQP[i].zValue); |
| 1779 | break; |
| 1780 | } |
| 1781 | case 1: { |
| 1782 | fossil_trace("%s = %s\n", zName, aParamQP[i].zValue); |
| 1783 | break; |
| 1784 | } |
| 1785 | case 2: { |
| 1786 | cgi_debug("%s = %s\n", zName, aParamQP[i].zValue); |
| 1787 | break; |
| 1788 | } |
| 1789 | } |
| 1790 | } |
| 1791 | } |
| 1792 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1549,11 +1549,11 @@ | |
| 1549 | @ contact the Fossil developers on the Fossil-SCM Forum. Type |
| 1550 | @ "fossil-scm forum" into any search engine to locate the Fossil-SCM Forum. |
| 1551 | style_finish_page(); |
| 1552 | cgi_set_status(418,"I'm a teapot"); |
| 1553 | cgi_reply(); |
| 1554 | fossil_errorlog("Xpossible hack attempt - 418 response on \"%s\"", zName); |
| 1555 | exit(0); |
| 1556 | } |
| 1557 | |
| 1558 | /* |
| 1559 | ** If looks_like_sql_injection() returns true for the given string, calls |
| @@ -1759,33 +1759,45 @@ | |
| 1759 | ** Omit the values of the cookies unless showAll is true. |
| 1760 | ** |
| 1761 | ** The eDest parameter determines where the output is shown: |
| 1762 | ** |
| 1763 | ** eDest==0: Rendering as HTML into the CGI reply |
| 1764 | ** eDest==1: Written to fossil_trace |
| 1765 | ** eDest==2: Written to cgi_debug |
| 1766 | ** eDest==3: Written to out (Used only by fossil_errorlog()) |
| 1767 | */ |
| 1768 | void cgi_print_all(int showAll, unsigned int eDest, FILE *out){ |
| 1769 | int i; |
| 1770 | cgi_parameter("",""); /* Force the parameters into sorted order */ |
| 1771 | for(i=0; i<nUsedQP; i++){ |
| 1772 | const char *zName = aParamQP[i].zName; |
| 1773 | const char *zValue = aParamQP[i].zValue; |
| 1774 | if( fossil_stricmp("HTTP_COOKIE",zName)==0 |
| 1775 | || fossil_strnicmp("fossil-",zName,7)==0 |
| 1776 | ){ |
| 1777 | if( !showAll ) continue; |
| 1778 | if( eDest==3 ) zValue = "..."; |
| 1779 | } |
| 1780 | switch( eDest ){ |
| 1781 | case 0: { |
| 1782 | cgi_printf("%h = %h <br>\n", zName, zValue); |
| 1783 | break; |
| 1784 | } |
| 1785 | case 1: { |
| 1786 | fossil_trace("%s = %s\n", zName, zValue); |
| 1787 | break; |
| 1788 | } |
| 1789 | case 2: { |
| 1790 | cgi_debug("%s = %s\n", zName, zValue); |
| 1791 | break; |
| 1792 | } |
| 1793 | case 3: { |
| 1794 | if( strlen(zValue)>100 ){ |
| 1795 | fprintf(out,"%s = %.100s...\n", zName, zValue); |
| 1796 | }else{ |
| 1797 | fprintf(out,"%s = %s\n", zName, zValue); |
| 1798 | } |
| 1799 | break; |
| 1800 | } |
| 1801 | } |
| 1802 | } |
| 1803 | } |
| 1804 |
+2
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2100,11 +2100,11 @@ | ||
| 2100 | 2100 | db_protect(PROTECT_READONLY); |
| 2101 | 2101 | } |
| 2102 | 2102 | } |
| 2103 | 2103 | if( g.fCgiTrace ){ |
| 2104 | 2104 | fossil_trace("######## Calling %s #########\n", pCmd->zName); |
| 2105 | - cgi_print_all(1, 1); | |
| 2105 | + cgi_print_all(1, 1, 0); | |
| 2106 | 2106 | } |
| 2107 | 2107 | #ifdef FOSSIL_ENABLE_TH1_HOOKS |
| 2108 | 2108 | { |
| 2109 | 2109 | /* |
| 2110 | 2110 | ** The TH1 return codes from the hook will be handled as follows: |
| @@ -2565,11 +2565,11 @@ | ||
| 2565 | 2565 | cgi_load_environment(); |
| 2566 | 2566 | g.fDebug = fossil_fopen(blob_str(&value), "ab"); |
| 2567 | 2567 | blob_reset(&value); |
| 2568 | 2568 | cgi_debug("-------- BEGIN cgi at %s --------\n", zNow); |
| 2569 | 2569 | fossil_free(zNow); |
| 2570 | - cgi_print_all(1,2); | |
| 2570 | + cgi_print_all(1,2,0); | |
| 2571 | 2571 | continue; |
| 2572 | 2572 | } |
| 2573 | 2573 | } |
| 2574 | 2574 | blob_reset(&config); |
| 2575 | 2575 | if( g.db==0 && g.zRepositoryName==0 && nRedirect==0 ){ |
| 2576 | 2576 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2100,11 +2100,11 @@ | |
| 2100 | db_protect(PROTECT_READONLY); |
| 2101 | } |
| 2102 | } |
| 2103 | if( g.fCgiTrace ){ |
| 2104 | fossil_trace("######## Calling %s #########\n", pCmd->zName); |
| 2105 | cgi_print_all(1, 1); |
| 2106 | } |
| 2107 | #ifdef FOSSIL_ENABLE_TH1_HOOKS |
| 2108 | { |
| 2109 | /* |
| 2110 | ** The TH1 return codes from the hook will be handled as follows: |
| @@ -2565,11 +2565,11 @@ | |
| 2565 | cgi_load_environment(); |
| 2566 | g.fDebug = fossil_fopen(blob_str(&value), "ab"); |
| 2567 | blob_reset(&value); |
| 2568 | cgi_debug("-------- BEGIN cgi at %s --------\n", zNow); |
| 2569 | fossil_free(zNow); |
| 2570 | cgi_print_all(1,2); |
| 2571 | continue; |
| 2572 | } |
| 2573 | } |
| 2574 | blob_reset(&config); |
| 2575 | if( g.db==0 && g.zRepositoryName==0 && nRedirect==0 ){ |
| 2576 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2100,11 +2100,11 @@ | |
| 2100 | db_protect(PROTECT_READONLY); |
| 2101 | } |
| 2102 | } |
| 2103 | if( g.fCgiTrace ){ |
| 2104 | fossil_trace("######## Calling %s #########\n", pCmd->zName); |
| 2105 | cgi_print_all(1, 1, 0); |
| 2106 | } |
| 2107 | #ifdef FOSSIL_ENABLE_TH1_HOOKS |
| 2108 | { |
| 2109 | /* |
| 2110 | ** The TH1 return codes from the hook will be handled as follows: |
| @@ -2565,11 +2565,11 @@ | |
| 2565 | cgi_load_environment(); |
| 2566 | g.fDebug = fossil_fopen(blob_str(&value), "ab"); |
| 2567 | blob_reset(&value); |
| 2568 | cgi_debug("-------- BEGIN cgi at %s --------\n", zNow); |
| 2569 | fossil_free(zNow); |
| 2570 | cgi_print_all(1,2,0); |
| 2571 | continue; |
| 2572 | } |
| 2573 | } |
| 2574 | blob_reset(&config); |
| 2575 | if( g.db==0 && g.zRepositoryName==0 && nRedirect==0 ){ |
| 2576 |
+19
-7
| --- src/printf.c | ||
| +++ src/printf.c | ||
| @@ -1037,17 +1037,21 @@ | ||
| 1037 | 1037 | } |
| 1038 | 1038 | |
| 1039 | 1039 | /* |
| 1040 | 1040 | ** Write a message to the error log, if the error log filename is |
| 1041 | 1041 | ** defined. |
| 1042 | +** | |
| 1043 | +** If the message format begins with 'X', then omit that X from the | |
| 1044 | +** beginning of the message and add much more CGI context. | |
| 1042 | 1045 | */ |
| 1043 | 1046 | void fossil_errorlog(const char *zFormat, ...){ |
| 1044 | 1047 | struct tm *pNow; |
| 1045 | 1048 | time_t now; |
| 1046 | 1049 | FILE *out; |
| 1047 | 1050 | const char *z; |
| 1048 | 1051 | int i; |
| 1052 | + int bDetail = 0; | |
| 1049 | 1053 | va_list ap; |
| 1050 | 1054 | static const char *const azEnv[] = { "HTTP_HOST", "HTTP_REFERER", |
| 1051 | 1055 | "HTTP_USER_AGENT", |
| 1052 | 1056 | "PATH_INFO", "QUERY_STRING", "REMOTE_ADDR", "REQUEST_METHOD", |
| 1053 | 1057 | "REQUEST_URI", "SCRIPT_NAME" }; |
| @@ -1062,20 +1066,28 @@ | ||
| 1062 | 1066 | pNow = gmtime(&now); |
| 1063 | 1067 | fprintf(out, "------------- %04d-%02d-%02d %02d:%02d:%02d UTC ------------\n", |
| 1064 | 1068 | pNow->tm_year+1900, pNow->tm_mon+1, pNow->tm_mday, |
| 1065 | 1069 | pNow->tm_hour, pNow->tm_min, pNow->tm_sec); |
| 1066 | 1070 | va_start(ap, zFormat); |
| 1071 | + if( zFormat[0]=='X' ){ | |
| 1072 | + bDetail = 1; | |
| 1073 | + zFormat++; | |
| 1074 | + } | |
| 1067 | 1075 | vfprintf(out, zFormat, ap); |
| 1068 | 1076 | fprintf(out, "\n"); |
| 1069 | 1077 | va_end(ap); |
| 1070 | - for(i=0; i<count(azEnv); i++){ | |
| 1071 | - char *p; | |
| 1072 | - if( (p = fossil_getenv(azEnv[i]))!=0 && p[0]!=0 ){ | |
| 1073 | - fprintf(out, "%s=%s\n", azEnv[i], p); | |
| 1074 | - fossil_path_free(p); | |
| 1075 | - }else if( (z = P(azEnv[i]))!=0 && z[0]!=0 ){ | |
| 1076 | - fprintf(out, "%s=%s\n", azEnv[i], z); | |
| 1078 | + if( bDetail ){ | |
| 1079 | + cgi_print_all(1,3,out); | |
| 1080 | + }else{ | |
| 1081 | + for(i=0; i<count(azEnv); i++){ | |
| 1082 | + char *p; | |
| 1083 | + if( (p = fossil_getenv(azEnv[i]))!=0 && p[0]!=0 ){ | |
| 1084 | + fprintf(out, "%s=%s\n", azEnv[i], p); | |
| 1085 | + fossil_path_free(p); | |
| 1086 | + }else if( (z = P(azEnv[i]))!=0 && z[0]!=0 ){ | |
| 1087 | + fprintf(out, "%s=%s\n", azEnv[i], z); | |
| 1088 | + } | |
| 1077 | 1089 | } |
| 1078 | 1090 | } |
| 1079 | 1091 | fclose(out); |
| 1080 | 1092 | } |
| 1081 | 1093 | |
| 1082 | 1094 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -1037,17 +1037,21 @@ | |
| 1037 | } |
| 1038 | |
| 1039 | /* |
| 1040 | ** Write a message to the error log, if the error log filename is |
| 1041 | ** defined. |
| 1042 | */ |
| 1043 | void fossil_errorlog(const char *zFormat, ...){ |
| 1044 | struct tm *pNow; |
| 1045 | time_t now; |
| 1046 | FILE *out; |
| 1047 | const char *z; |
| 1048 | int i; |
| 1049 | va_list ap; |
| 1050 | static const char *const azEnv[] = { "HTTP_HOST", "HTTP_REFERER", |
| 1051 | "HTTP_USER_AGENT", |
| 1052 | "PATH_INFO", "QUERY_STRING", "REMOTE_ADDR", "REQUEST_METHOD", |
| 1053 | "REQUEST_URI", "SCRIPT_NAME" }; |
| @@ -1062,20 +1066,28 @@ | |
| 1062 | pNow = gmtime(&now); |
| 1063 | fprintf(out, "------------- %04d-%02d-%02d %02d:%02d:%02d UTC ------------\n", |
| 1064 | pNow->tm_year+1900, pNow->tm_mon+1, pNow->tm_mday, |
| 1065 | pNow->tm_hour, pNow->tm_min, pNow->tm_sec); |
| 1066 | va_start(ap, zFormat); |
| 1067 | vfprintf(out, zFormat, ap); |
| 1068 | fprintf(out, "\n"); |
| 1069 | va_end(ap); |
| 1070 | for(i=0; i<count(azEnv); i++){ |
| 1071 | char *p; |
| 1072 | if( (p = fossil_getenv(azEnv[i]))!=0 && p[0]!=0 ){ |
| 1073 | fprintf(out, "%s=%s\n", azEnv[i], p); |
| 1074 | fossil_path_free(p); |
| 1075 | }else if( (z = P(azEnv[i]))!=0 && z[0]!=0 ){ |
| 1076 | fprintf(out, "%s=%s\n", azEnv[i], z); |
| 1077 | } |
| 1078 | } |
| 1079 | fclose(out); |
| 1080 | } |
| 1081 | |
| 1082 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -1037,17 +1037,21 @@ | |
| 1037 | } |
| 1038 | |
| 1039 | /* |
| 1040 | ** Write a message to the error log, if the error log filename is |
| 1041 | ** defined. |
| 1042 | ** |
| 1043 | ** If the message format begins with 'X', then omit that X from the |
| 1044 | ** beginning of the message and add much more CGI context. |
| 1045 | */ |
| 1046 | void fossil_errorlog(const char *zFormat, ...){ |
| 1047 | struct tm *pNow; |
| 1048 | time_t now; |
| 1049 | FILE *out; |
| 1050 | const char *z; |
| 1051 | int i; |
| 1052 | int bDetail = 0; |
| 1053 | va_list ap; |
| 1054 | static const char *const azEnv[] = { "HTTP_HOST", "HTTP_REFERER", |
| 1055 | "HTTP_USER_AGENT", |
| 1056 | "PATH_INFO", "QUERY_STRING", "REMOTE_ADDR", "REQUEST_METHOD", |
| 1057 | "REQUEST_URI", "SCRIPT_NAME" }; |
| @@ -1062,20 +1066,28 @@ | |
| 1066 | pNow = gmtime(&now); |
| 1067 | fprintf(out, "------------- %04d-%02d-%02d %02d:%02d:%02d UTC ------------\n", |
| 1068 | pNow->tm_year+1900, pNow->tm_mon+1, pNow->tm_mday, |
| 1069 | pNow->tm_hour, pNow->tm_min, pNow->tm_sec); |
| 1070 | va_start(ap, zFormat); |
| 1071 | if( zFormat[0]=='X' ){ |
| 1072 | bDetail = 1; |
| 1073 | zFormat++; |
| 1074 | } |
| 1075 | vfprintf(out, zFormat, ap); |
| 1076 | fprintf(out, "\n"); |
| 1077 | va_end(ap); |
| 1078 | if( bDetail ){ |
| 1079 | cgi_print_all(1,3,out); |
| 1080 | }else{ |
| 1081 | for(i=0; i<count(azEnv); i++){ |
| 1082 | char *p; |
| 1083 | if( (p = fossil_getenv(azEnv[i]))!=0 && p[0]!=0 ){ |
| 1084 | fprintf(out, "%s=%s\n", azEnv[i], p); |
| 1085 | fossil_path_free(p); |
| 1086 | }else if( (z = P(azEnv[i]))!=0 && z[0]!=0 ){ |
| 1087 | fprintf(out, "%s=%s\n", azEnv[i], z); |
| 1088 | } |
| 1089 | } |
| 1090 | } |
| 1091 | fclose(out); |
| 1092 | } |
| 1093 | |
| 1094 |
+2
-2
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -834,11 +834,11 @@ | ||
| 834 | 834 | g.cgiOutput = 1; |
| 835 | 835 | headerHasBeenGenerated = 1; |
| 836 | 836 | sideboxUsed = 0; |
| 837 | 837 | if( g.perm.Debug && P("showqp") ){ |
| 838 | 838 | @ <div class="debug"> |
| 839 | - cgi_print_all(0, 0); | |
| 839 | + cgi_print_all(0, 0, 0); | |
| 840 | 840 | @ </div> |
| 841 | 841 | } |
| 842 | 842 | } |
| 843 | 843 | |
| 844 | 844 | #if INTERFACE |
| @@ -1474,11 +1474,11 @@ | ||
| 1474 | 1474 | } |
| 1475 | 1475 | } |
| 1476 | 1476 | @ <hr> |
| 1477 | 1477 | P("HTTP_USER_AGENT"); |
| 1478 | 1478 | P("SERVER_SOFTWARE"); |
| 1479 | - cgi_print_all(showAll, 0); | |
| 1479 | + cgi_print_all(showAll, 0, 0); | |
| 1480 | 1480 | if( showAll && blob_size(&g.httpHeader)>0 ){ |
| 1481 | 1481 | @ <hr> |
| 1482 | 1482 | @ <pre> |
| 1483 | 1483 | @ %h(blob_str(&g.httpHeader)) |
| 1484 | 1484 | @ </pre> |
| 1485 | 1485 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -834,11 +834,11 @@ | |
| 834 | g.cgiOutput = 1; |
| 835 | headerHasBeenGenerated = 1; |
| 836 | sideboxUsed = 0; |
| 837 | if( g.perm.Debug && P("showqp") ){ |
| 838 | @ <div class="debug"> |
| 839 | cgi_print_all(0, 0); |
| 840 | @ </div> |
| 841 | } |
| 842 | } |
| 843 | |
| 844 | #if INTERFACE |
| @@ -1474,11 +1474,11 @@ | |
| 1474 | } |
| 1475 | } |
| 1476 | @ <hr> |
| 1477 | P("HTTP_USER_AGENT"); |
| 1478 | P("SERVER_SOFTWARE"); |
| 1479 | cgi_print_all(showAll, 0); |
| 1480 | if( showAll && blob_size(&g.httpHeader)>0 ){ |
| 1481 | @ <hr> |
| 1482 | @ <pre> |
| 1483 | @ %h(blob_str(&g.httpHeader)) |
| 1484 | @ </pre> |
| 1485 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -834,11 +834,11 @@ | |
| 834 | g.cgiOutput = 1; |
| 835 | headerHasBeenGenerated = 1; |
| 836 | sideboxUsed = 0; |
| 837 | if( g.perm.Debug && P("showqp") ){ |
| 838 | @ <div class="debug"> |
| 839 | cgi_print_all(0, 0, 0); |
| 840 | @ </div> |
| 841 | } |
| 842 | } |
| 843 | |
| 844 | #if INTERFACE |
| @@ -1474,11 +1474,11 @@ | |
| 1474 | } |
| 1475 | } |
| 1476 | @ <hr> |
| 1477 | P("HTTP_USER_AGENT"); |
| 1478 | P("SERVER_SOFTWARE"); |
| 1479 | cgi_print_all(showAll, 0, 0); |
| 1480 | if( showAll && blob_size(&g.httpHeader)>0 ){ |
| 1481 | @ <hr> |
| 1482 | @ <pre> |
| 1483 | @ %h(blob_str(&g.httpHeader)) |
| 1484 | @ </pre> |
| 1485 |