Fossil SCM
Merge in trunk for manifest_parse() output fix and "hidden" ajax routes.
Commit
f68b0b71872b974bef8add73a2a1794ae2451125ac045b5a495ca7d1dfea0c5b
Parent
fd7d2557aa2a31c…
8 files changed
+10
-4
+8
+1
-1
+24
-4
+18
-8
+3
+1
-1
+1
-1
+10
-4
| --- src/blob.c | ||
| +++ src/blob.c | ||
| @@ -276,11 +276,12 @@ | ||
| 276 | 276 | pBlob->xRealloc = blobReallocStatic; |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | /* |
| 280 | 280 | ** Append text or data to the end of a blob. Or, if pBlob==NULL, send |
| 281 | -** the text to standard output. | |
| 281 | +** the text to standard output in terminal mode, or to standard CGI output | |
| 282 | +** in CGI mode. | |
| 282 | 283 | ** |
| 283 | 284 | ** If nData<0 then output all of aData up to the first 0x00 byte. |
| 284 | 285 | ** |
| 285 | 286 | ** Use the blob_append() routine in all application code. The blob_append() |
| 286 | 287 | ** routine is faster, but blob_append_full() handles all the corner cases. |
| @@ -292,12 +293,16 @@ | ||
| 292 | 293 | /* assert( aData!=0 || nData==0 ); // omitted for speed */ |
| 293 | 294 | /* blob_is_init(pBlob); // omitted for speed */ |
| 294 | 295 | if( nData<0 ) nData = strlen(aData); |
| 295 | 296 | if( nData==0 ) return; |
| 296 | 297 | if( pBlob==0 ){ |
| 297 | - fossil_puts(aData, 0, nData); | |
| 298 | - return; | |
| 298 | + if( g.cgiOutput ){ | |
| 299 | + pBlob = cgi_output_blob(); | |
| 300 | + }else{ | |
| 301 | + fossil_puts(aData, 0, nData); | |
| 302 | + return; | |
| 303 | + } | |
| 299 | 304 | } |
| 300 | 305 | nNew = pBlob->nUsed; |
| 301 | 306 | nNew += nData; |
| 302 | 307 | if( nNew >= pBlob->nAlloc ){ |
| 303 | 308 | nNew += pBlob->nAlloc; |
| @@ -356,11 +361,12 @@ | ||
| 356 | 361 | } |
| 357 | 362 | |
| 358 | 363 | /* |
| 359 | 364 | ** Append the second blob onto the end of the first blob and reset the |
| 360 | 365 | ** second blob. If the first blob (pTo) is NULL, then the content |
| 361 | -** of the second blob is written to stdout. | |
| 366 | +** of the second blob is written to stdout or to CGI depending on if the | |
| 367 | +** Fossil is running in terminal or CGI mode. | |
| 362 | 368 | */ |
| 363 | 369 | void blob_append_xfer(Blob *pTo, Blob *pFrom){ |
| 364 | 370 | blob_append(pTo, blob_buffer(pFrom), blob_size(pFrom)); |
| 365 | 371 | blob_reset(pFrom); |
| 366 | 372 | } |
| 367 | 373 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -276,11 +276,12 @@ | |
| 276 | pBlob->xRealloc = blobReallocStatic; |
| 277 | } |
| 278 | |
| 279 | /* |
| 280 | ** Append text or data to the end of a blob. Or, if pBlob==NULL, send |
| 281 | ** the text to standard output. |
| 282 | ** |
| 283 | ** If nData<0 then output all of aData up to the first 0x00 byte. |
| 284 | ** |
| 285 | ** Use the blob_append() routine in all application code. The blob_append() |
| 286 | ** routine is faster, but blob_append_full() handles all the corner cases. |
| @@ -292,12 +293,16 @@ | |
| 292 | /* assert( aData!=0 || nData==0 ); // omitted for speed */ |
| 293 | /* blob_is_init(pBlob); // omitted for speed */ |
| 294 | if( nData<0 ) nData = strlen(aData); |
| 295 | if( nData==0 ) return; |
| 296 | if( pBlob==0 ){ |
| 297 | fossil_puts(aData, 0, nData); |
| 298 | return; |
| 299 | } |
| 300 | nNew = pBlob->nUsed; |
| 301 | nNew += nData; |
| 302 | if( nNew >= pBlob->nAlloc ){ |
| 303 | nNew += pBlob->nAlloc; |
| @@ -356,11 +361,12 @@ | |
| 356 | } |
| 357 | |
| 358 | /* |
| 359 | ** Append the second blob onto the end of the first blob and reset the |
| 360 | ** second blob. If the first blob (pTo) is NULL, then the content |
| 361 | ** of the second blob is written to stdout. |
| 362 | */ |
| 363 | void blob_append_xfer(Blob *pTo, Blob *pFrom){ |
| 364 | blob_append(pTo, blob_buffer(pFrom), blob_size(pFrom)); |
| 365 | blob_reset(pFrom); |
| 366 | } |
| 367 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -276,11 +276,12 @@ | |
| 276 | pBlob->xRealloc = blobReallocStatic; |
| 277 | } |
| 278 | |
| 279 | /* |
| 280 | ** Append text or data to the end of a blob. Or, if pBlob==NULL, send |
| 281 | ** the text to standard output in terminal mode, or to standard CGI output |
| 282 | ** in CGI mode. |
| 283 | ** |
| 284 | ** If nData<0 then output all of aData up to the first 0x00 byte. |
| 285 | ** |
| 286 | ** Use the blob_append() routine in all application code. The blob_append() |
| 287 | ** routine is faster, but blob_append_full() handles all the corner cases. |
| @@ -292,12 +293,16 @@ | |
| 293 | /* assert( aData!=0 || nData==0 ); // omitted for speed */ |
| 294 | /* blob_is_init(pBlob); // omitted for speed */ |
| 295 | if( nData<0 ) nData = strlen(aData); |
| 296 | if( nData==0 ) return; |
| 297 | if( pBlob==0 ){ |
| 298 | if( g.cgiOutput ){ |
| 299 | pBlob = cgi_output_blob(); |
| 300 | }else{ |
| 301 | fossil_puts(aData, 0, nData); |
| 302 | return; |
| 303 | } |
| 304 | } |
| 305 | nNew = pBlob->nUsed; |
| 306 | nNew += nData; |
| 307 | if( nNew >= pBlob->nAlloc ){ |
| 308 | nNew += pBlob->nAlloc; |
| @@ -356,11 +361,12 @@ | |
| 361 | } |
| 362 | |
| 363 | /* |
| 364 | ** Append the second blob onto the end of the first blob and reset the |
| 365 | ** second blob. If the first blob (pTo) is NULL, then the content |
| 366 | ** of the second blob is written to stdout or to CGI depending on if the |
| 367 | ** Fossil is running in terminal or CGI mode. |
| 368 | */ |
| 369 | void blob_append_xfer(Blob *pTo, Blob *pFrom){ |
| 370 | blob_append(pTo, blob_buffer(pFrom), blob_size(pFrom)); |
| 371 | blob_reset(pFrom); |
| 372 | } |
| 373 |
+8
| --- src/dispatch.c | ||
| +++ src/dispatch.c | ||
| @@ -48,10 +48,12 @@ | ||
| 48 | 48 | #define CMDFLAG_SETTING 0x0020 /* A setting */ |
| 49 | 49 | #define CMDFLAG_VERSIONABLE 0x0040 /* A versionable setting */ |
| 50 | 50 | #define CMDFLAG_BLOCKTEXT 0x0080 /* Multi-line text setting */ |
| 51 | 51 | #define CMDFLAG_BOOLEAN 0x0100 /* A boolean setting */ |
| 52 | 52 | #define CMDFLAG_RAWCONTENT 0x0200 /* Do not interpret POST content */ |
| 53 | +/* NOTE: 0x0400 = CMDFLAG_SENSITIVE in mkindex.c! */ | |
| 54 | +#define CMDFLAG_HIDDEN 0x0800 /* Elide from most listings */ | |
| 53 | 55 | /**************************************************************************/ |
| 54 | 56 | |
| 55 | 57 | /* Values for the 2nd parameter to dispatch_name_search() */ |
| 56 | 58 | #define CMDFLAG_ANY 0x0038 /* Match anything */ |
| 57 | 59 | #define CMDFLAG_PREFIX 0x0200 /* Prefix match is ok */ |
| @@ -551,10 +553,11 @@ | ||
| 551 | 553 | }else{ |
| 552 | 554 | fossil_print("---\n"); |
| 553 | 555 | } |
| 554 | 556 | for(i=0; i<MX_COMMAND; i++){ |
| 555 | 557 | if( (aCommand[i].eCmdFlags & mask)==0 ) continue; |
| 558 | + else if(aCommand[i].eCmdFlags & CMDFLAG_HIDDEN) continue; | |
| 556 | 559 | if( useHtml ){ |
| 557 | 560 | Blob html; |
| 558 | 561 | blob_init(&html, 0, 0); |
| 559 | 562 | help_to_html(aCommand[i].zHelp, &html); |
| 560 | 563 | fossil_print("<h1>%h</h1>\n", aCommand[i].zName); |
| @@ -829,10 +832,11 @@ | ||
| 829 | 832 | const char *z = aCommand[i].zName; |
| 830 | 833 | const char *zBoldOn = aCommand[i].eCmdFlags&CMDFLAG_1ST_TIER?"<b>" :""; |
| 831 | 834 | const char *zBoldOff = aCommand[i].eCmdFlags&CMDFLAG_1ST_TIER?"</b>":""; |
| 832 | 835 | if( '/'==*z || strncmp(z,"test",4)==0 ) continue; |
| 833 | 836 | if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)!=0 ) continue; |
| 837 | + else if( (aCommand[i].eCmdFlags & CMDFLAG_HIDDEN)!=0 ) continue; | |
| 834 | 838 | @ <li><a href="%R/help?cmd=%s(z)">%s(zBoldOn)%s(z)%s(zBoldOff)</a></li> |
| 835 | 839 | } |
| 836 | 840 | @ </ul></div> |
| 837 | 841 | |
| 838 | 842 | @ <a name='webpages'></a> |
| @@ -840,10 +844,11 @@ | ||
| 840 | 844 | @ <div class="columns" style="column-width: 18ex;"> |
| 841 | 845 | @ <ul> |
| 842 | 846 | for(i=0; i<MX_COMMAND; i++){ |
| 843 | 847 | const char *z = aCommand[i].zName; |
| 844 | 848 | if( '/'!=*z ) continue; |
| 849 | + else if( (aCommand[i].eCmdFlags & CMDFLAG_HIDDEN)!=0 ) continue; | |
| 845 | 850 | if( aCommand[i].zHelp[0] ){ |
| 846 | 851 | @ <li><a href="%R/help?cmd=%s(z)">%s(z+1)</a></li> |
| 847 | 852 | }else{ |
| 848 | 853 | @ <li>%s(z+1)</li> |
| 849 | 854 | } |
| @@ -855,10 +860,11 @@ | ||
| 855 | 860 | @ <div class="columns" style="column-width: 20ex;"> |
| 856 | 861 | @ <ul> |
| 857 | 862 | for(i=0; i<MX_COMMAND; i++){ |
| 858 | 863 | const char *z = aCommand[i].zName; |
| 859 | 864 | if( strncmp(z,"test",4)!=0 ) continue; |
| 865 | + else if( (aCommand[i].eCmdFlags & CMDFLAG_HIDDEN)!=0 ) continue; | |
| 860 | 866 | if( aCommand[i].zHelp[0] ){ |
| 861 | 867 | @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li> |
| 862 | 868 | }else{ |
| 863 | 869 | @ <li>%s(z)</li> |
| 864 | 870 | } |
| @@ -870,10 +876,11 @@ | ||
| 870 | 876 | @ <div class="columns" style="column-width: 20ex;"> |
| 871 | 877 | @ <ul> |
| 872 | 878 | for(i=0; i<MX_COMMAND; i++){ |
| 873 | 879 | const char *z = aCommand[i].zName; |
| 874 | 880 | if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue; |
| 881 | + else if( (aCommand[i].eCmdFlags & CMDFLAG_HIDDEN)!=0 ) continue; | |
| 875 | 882 | if( aCommand[i].zHelp[0] ){ |
| 876 | 883 | @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li> |
| 877 | 884 | }else{ |
| 878 | 885 | @ <li>%s(z)</li> |
| 879 | 886 | } |
| @@ -985,10 +992,11 @@ | ||
| 985 | 992 | }else{ |
| 986 | 993 | int i, nCmd; |
| 987 | 994 | const char *aCmd[MX_COMMAND]; |
| 988 | 995 | for(i=nCmd=0; i<MX_COMMAND; i++){ |
| 989 | 996 | if( (aCommand[i].eCmdFlags & cmdMask)==0 ) continue; |
| 997 | + else if(aCommand[i].eCmdFlags & CMDFLAG_HIDDEN) continue; | |
| 990 | 998 | aCmd[nCmd++] = aCommand[i].zName; |
| 991 | 999 | } |
| 992 | 1000 | multi_column_list(aCmd, nCmd); |
| 993 | 1001 | } |
| 994 | 1002 | } |
| 995 | 1003 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -48,10 +48,12 @@ | |
| 48 | #define CMDFLAG_SETTING 0x0020 /* A setting */ |
| 49 | #define CMDFLAG_VERSIONABLE 0x0040 /* A versionable setting */ |
| 50 | #define CMDFLAG_BLOCKTEXT 0x0080 /* Multi-line text setting */ |
| 51 | #define CMDFLAG_BOOLEAN 0x0100 /* A boolean setting */ |
| 52 | #define CMDFLAG_RAWCONTENT 0x0200 /* Do not interpret POST content */ |
| 53 | /**************************************************************************/ |
| 54 | |
| 55 | /* Values for the 2nd parameter to dispatch_name_search() */ |
| 56 | #define CMDFLAG_ANY 0x0038 /* Match anything */ |
| 57 | #define CMDFLAG_PREFIX 0x0200 /* Prefix match is ok */ |
| @@ -551,10 +553,11 @@ | |
| 551 | }else{ |
| 552 | fossil_print("---\n"); |
| 553 | } |
| 554 | for(i=0; i<MX_COMMAND; i++){ |
| 555 | if( (aCommand[i].eCmdFlags & mask)==0 ) continue; |
| 556 | if( useHtml ){ |
| 557 | Blob html; |
| 558 | blob_init(&html, 0, 0); |
| 559 | help_to_html(aCommand[i].zHelp, &html); |
| 560 | fossil_print("<h1>%h</h1>\n", aCommand[i].zName); |
| @@ -829,10 +832,11 @@ | |
| 829 | const char *z = aCommand[i].zName; |
| 830 | const char *zBoldOn = aCommand[i].eCmdFlags&CMDFLAG_1ST_TIER?"<b>" :""; |
| 831 | const char *zBoldOff = aCommand[i].eCmdFlags&CMDFLAG_1ST_TIER?"</b>":""; |
| 832 | if( '/'==*z || strncmp(z,"test",4)==0 ) continue; |
| 833 | if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)!=0 ) continue; |
| 834 | @ <li><a href="%R/help?cmd=%s(z)">%s(zBoldOn)%s(z)%s(zBoldOff)</a></li> |
| 835 | } |
| 836 | @ </ul></div> |
| 837 | |
| 838 | @ <a name='webpages'></a> |
| @@ -840,10 +844,11 @@ | |
| 840 | @ <div class="columns" style="column-width: 18ex;"> |
| 841 | @ <ul> |
| 842 | for(i=0; i<MX_COMMAND; i++){ |
| 843 | const char *z = aCommand[i].zName; |
| 844 | if( '/'!=*z ) continue; |
| 845 | if( aCommand[i].zHelp[0] ){ |
| 846 | @ <li><a href="%R/help?cmd=%s(z)">%s(z+1)</a></li> |
| 847 | }else{ |
| 848 | @ <li>%s(z+1)</li> |
| 849 | } |
| @@ -855,10 +860,11 @@ | |
| 855 | @ <div class="columns" style="column-width: 20ex;"> |
| 856 | @ <ul> |
| 857 | for(i=0; i<MX_COMMAND; i++){ |
| 858 | const char *z = aCommand[i].zName; |
| 859 | if( strncmp(z,"test",4)!=0 ) continue; |
| 860 | if( aCommand[i].zHelp[0] ){ |
| 861 | @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li> |
| 862 | }else{ |
| 863 | @ <li>%s(z)</li> |
| 864 | } |
| @@ -870,10 +876,11 @@ | |
| 870 | @ <div class="columns" style="column-width: 20ex;"> |
| 871 | @ <ul> |
| 872 | for(i=0; i<MX_COMMAND; i++){ |
| 873 | const char *z = aCommand[i].zName; |
| 874 | if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue; |
| 875 | if( aCommand[i].zHelp[0] ){ |
| 876 | @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li> |
| 877 | }else{ |
| 878 | @ <li>%s(z)</li> |
| 879 | } |
| @@ -985,10 +992,11 @@ | |
| 985 | }else{ |
| 986 | int i, nCmd; |
| 987 | const char *aCmd[MX_COMMAND]; |
| 988 | for(i=nCmd=0; i<MX_COMMAND; i++){ |
| 989 | if( (aCommand[i].eCmdFlags & cmdMask)==0 ) continue; |
| 990 | aCmd[nCmd++] = aCommand[i].zName; |
| 991 | } |
| 992 | multi_column_list(aCmd, nCmd); |
| 993 | } |
| 994 | } |
| 995 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -48,10 +48,12 @@ | |
| 48 | #define CMDFLAG_SETTING 0x0020 /* A setting */ |
| 49 | #define CMDFLAG_VERSIONABLE 0x0040 /* A versionable setting */ |
| 50 | #define CMDFLAG_BLOCKTEXT 0x0080 /* Multi-line text setting */ |
| 51 | #define CMDFLAG_BOOLEAN 0x0100 /* A boolean setting */ |
| 52 | #define CMDFLAG_RAWCONTENT 0x0200 /* Do not interpret POST content */ |
| 53 | /* NOTE: 0x0400 = CMDFLAG_SENSITIVE in mkindex.c! */ |
| 54 | #define CMDFLAG_HIDDEN 0x0800 /* Elide from most listings */ |
| 55 | /**************************************************************************/ |
| 56 | |
| 57 | /* Values for the 2nd parameter to dispatch_name_search() */ |
| 58 | #define CMDFLAG_ANY 0x0038 /* Match anything */ |
| 59 | #define CMDFLAG_PREFIX 0x0200 /* Prefix match is ok */ |
| @@ -551,10 +553,11 @@ | |
| 553 | }else{ |
| 554 | fossil_print("---\n"); |
| 555 | } |
| 556 | for(i=0; i<MX_COMMAND; i++){ |
| 557 | if( (aCommand[i].eCmdFlags & mask)==0 ) continue; |
| 558 | else if(aCommand[i].eCmdFlags & CMDFLAG_HIDDEN) continue; |
| 559 | if( useHtml ){ |
| 560 | Blob html; |
| 561 | blob_init(&html, 0, 0); |
| 562 | help_to_html(aCommand[i].zHelp, &html); |
| 563 | fossil_print("<h1>%h</h1>\n", aCommand[i].zName); |
| @@ -829,10 +832,11 @@ | |
| 832 | const char *z = aCommand[i].zName; |
| 833 | const char *zBoldOn = aCommand[i].eCmdFlags&CMDFLAG_1ST_TIER?"<b>" :""; |
| 834 | const char *zBoldOff = aCommand[i].eCmdFlags&CMDFLAG_1ST_TIER?"</b>":""; |
| 835 | if( '/'==*z || strncmp(z,"test",4)==0 ) continue; |
| 836 | if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)!=0 ) continue; |
| 837 | else if( (aCommand[i].eCmdFlags & CMDFLAG_HIDDEN)!=0 ) continue; |
| 838 | @ <li><a href="%R/help?cmd=%s(z)">%s(zBoldOn)%s(z)%s(zBoldOff)</a></li> |
| 839 | } |
| 840 | @ </ul></div> |
| 841 | |
| 842 | @ <a name='webpages'></a> |
| @@ -840,10 +844,11 @@ | |
| 844 | @ <div class="columns" style="column-width: 18ex;"> |
| 845 | @ <ul> |
| 846 | for(i=0; i<MX_COMMAND; i++){ |
| 847 | const char *z = aCommand[i].zName; |
| 848 | if( '/'!=*z ) continue; |
| 849 | else if( (aCommand[i].eCmdFlags & CMDFLAG_HIDDEN)!=0 ) continue; |
| 850 | if( aCommand[i].zHelp[0] ){ |
| 851 | @ <li><a href="%R/help?cmd=%s(z)">%s(z+1)</a></li> |
| 852 | }else{ |
| 853 | @ <li>%s(z+1)</li> |
| 854 | } |
| @@ -855,10 +860,11 @@ | |
| 860 | @ <div class="columns" style="column-width: 20ex;"> |
| 861 | @ <ul> |
| 862 | for(i=0; i<MX_COMMAND; i++){ |
| 863 | const char *z = aCommand[i].zName; |
| 864 | if( strncmp(z,"test",4)!=0 ) continue; |
| 865 | else if( (aCommand[i].eCmdFlags & CMDFLAG_HIDDEN)!=0 ) continue; |
| 866 | if( aCommand[i].zHelp[0] ){ |
| 867 | @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li> |
| 868 | }else{ |
| 869 | @ <li>%s(z)</li> |
| 870 | } |
| @@ -870,10 +876,11 @@ | |
| 876 | @ <div class="columns" style="column-width: 20ex;"> |
| 877 | @ <ul> |
| 878 | for(i=0; i<MX_COMMAND; i++){ |
| 879 | const char *z = aCommand[i].zName; |
| 880 | if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue; |
| 881 | else if( (aCommand[i].eCmdFlags & CMDFLAG_HIDDEN)!=0 ) continue; |
| 882 | if( aCommand[i].zHelp[0] ){ |
| 883 | @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li> |
| 884 | }else{ |
| 885 | @ <li>%s(z)</li> |
| 886 | } |
| @@ -985,10 +992,11 @@ | |
| 992 | }else{ |
| 993 | int i, nCmd; |
| 994 | const char *aCmd[MX_COMMAND]; |
| 995 | for(i=nCmd=0; i<MX_COMMAND; i++){ |
| 996 | if( (aCommand[i].eCmdFlags & cmdMask)==0 ) continue; |
| 997 | else if(aCommand[i].eCmdFlags & CMDFLAG_HIDDEN) continue; |
| 998 | aCmd[nCmd++] = aCommand[i].zName; |
| 999 | } |
| 1000 | multi_column_list(aCmd, nCmd); |
| 1001 | } |
| 1002 | } |
| 1003 |
+1
-1
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -1022,11 +1022,11 @@ | ||
| 1022 | 1022 | uid = db_int(0, "SELECT uid FROM user WHERE login=%Q", zLogin); |
| 1023 | 1023 | }else{ |
| 1024 | 1024 | uid = db_int(0, "SELECT uid FROM user WHERE cap LIKE '%%s%%'"); |
| 1025 | 1025 | } |
| 1026 | 1026 | g.zLogin = db_text("?", "SELECT login FROM user WHERE uid=%d", uid); |
| 1027 | - zCap = "sx"; | |
| 1027 | + zCap = "sxy"; | |
| 1028 | 1028 | g.noPswd = 1; |
| 1029 | 1029 | g.isHuman = 1; |
| 1030 | 1030 | sqlite3_snprintf(sizeof(g.zCsrfToken), g.zCsrfToken, "localhost"); |
| 1031 | 1031 | } |
| 1032 | 1032 | |
| 1033 | 1033 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1022,11 +1022,11 @@ | |
| 1022 | uid = db_int(0, "SELECT uid FROM user WHERE login=%Q", zLogin); |
| 1023 | }else{ |
| 1024 | uid = db_int(0, "SELECT uid FROM user WHERE cap LIKE '%%s%%'"); |
| 1025 | } |
| 1026 | g.zLogin = db_text("?", "SELECT login FROM user WHERE uid=%d", uid); |
| 1027 | zCap = "sx"; |
| 1028 | g.noPswd = 1; |
| 1029 | g.isHuman = 1; |
| 1030 | sqlite3_snprintf(sizeof(g.zCsrfToken), g.zCsrfToken, "localhost"); |
| 1031 | } |
| 1032 | |
| 1033 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1022,11 +1022,11 @@ | |
| 1022 | uid = db_int(0, "SELECT uid FROM user WHERE login=%Q", zLogin); |
| 1023 | }else{ |
| 1024 | uid = db_int(0, "SELECT uid FROM user WHERE cap LIKE '%%s%%'"); |
| 1025 | } |
| 1026 | g.zLogin = db_text("?", "SELECT login FROM user WHERE uid=%d", uid); |
| 1027 | zCap = "sxy"; |
| 1028 | g.noPswd = 1; |
| 1029 | g.isHuman = 1; |
| 1030 | sqlite3_snprintf(sizeof(g.zCsrfToken), g.zCsrfToken, "localhost"); |
| 1031 | } |
| 1032 | |
| 1033 |
+24
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2741,31 +2741,51 @@ | ||
| 2741 | 2741 | } while ( g.fSshClient & CGI_SSH_FOSSIL || |
| 2742 | 2742 | g.fSshClient & CGI_SSH_COMPAT ); |
| 2743 | 2743 | } |
| 2744 | 2744 | |
| 2745 | 2745 | /* |
| 2746 | -** Note that the following command is used by ssh:// processing. | |
| 2747 | -** | |
| 2748 | 2746 | ** COMMAND: test-http |
| 2749 | 2747 | ** |
| 2750 | -** Works like the [[http]] command but gives setup permission to all users. | |
| 2748 | +** Works like the [[http]] command but gives setup permission to all users, | |
| 2749 | +** or whatever permission is described by "--usercap CAP". | |
| 2750 | +** | |
| 2751 | +** This command can used for interactive debugging of web pages. For | |
| 2752 | +** example, one can put a simple HTTP request in a file like this: | |
| 2753 | +** | |
| 2754 | +** echo 'GET /timeline' >request.txt | |
| 2755 | +** | |
| 2756 | +** Then run (in a debugger) a command like this: | |
| 2757 | +** | |
| 2758 | +** fossil test-http --debug <request.txt | |
| 2759 | +** | |
| 2760 | +** This command is also used internally by the "ssh" sync protocol. Some | |
| 2761 | +** special processing to support sync happens when this command is run | |
| 2762 | +** and the SSH_CONNECTION environment variable is set. Use the --test | |
| 2763 | +** option on interactive sessions to avoid that special processing when | |
| 2764 | +** using this command interactively over SSH. A better solution would be | |
| 2765 | +** to use a different command for "ssh" sync, but we cannot do that without | |
| 2766 | +** breaking legacy. | |
| 2751 | 2767 | ** |
| 2752 | 2768 | ** Options: |
| 2769 | +** --test Do not do special "sync" processing when operating | |
| 2770 | +** over an SSH link. | |
| 2753 | 2771 | ** --th-trace Trace TH1 execution (for debugging purposes) |
| 2754 | 2772 | ** --usercap CAP User capability string (Default: "sxy") |
| 2755 | 2773 | ** |
| 2756 | 2774 | */ |
| 2757 | 2775 | void cmd_test_http(void){ |
| 2758 | 2776 | const char *zIpAddr; /* IP address of remote client */ |
| 2759 | 2777 | const char *zUserCap; |
| 2778 | + int bTest = 0; | |
| 2760 | 2779 | |
| 2761 | 2780 | Th_InitTraceLog(); |
| 2762 | 2781 | zUserCap = find_option("usercap",0,1); |
| 2763 | 2782 | if( zUserCap==0 ){ |
| 2764 | 2783 | g.useLocalauth = 1; |
| 2765 | 2784 | zUserCap = "sxy"; |
| 2766 | 2785 | } |
| 2786 | + bTest = find_option("test",0,0)!=0; | |
| 2767 | 2787 | login_set_capabilities(zUserCap, 0); |
| 2768 | 2788 | g.httpIn = stdin; |
| 2769 | 2789 | g.httpOut = stdout; |
| 2770 | 2790 | fossil_binary_mode(g.httpOut); |
| 2771 | 2791 | fossil_binary_mode(g.httpIn); |
| @@ -2773,11 +2793,11 @@ | ||
| 2773 | 2793 | find_server_repository(2, 0); |
| 2774 | 2794 | g.cgiOutput = 1; |
| 2775 | 2795 | g.fNoHttpCompress = 1; |
| 2776 | 2796 | g.fullHttpReply = 1; |
| 2777 | 2797 | g.sslNotAvailable = 1; /* Avoid attempts to redirect */ |
| 2778 | - zIpAddr = cgi_ssh_remote_addr(0); | |
| 2798 | + zIpAddr = bTest ? 0 : cgi_ssh_remote_addr(0); | |
| 2779 | 2799 | if( zIpAddr && zIpAddr[0] ){ |
| 2780 | 2800 | g.fSshClient |= CGI_SSH_CLIENT; |
| 2781 | 2801 | ssh_request_loop(zIpAddr, 0); |
| 2782 | 2802 | }else{ |
| 2783 | 2803 | cgi_set_parameter("REMOTE_ADDR", "127.0.0.1"); |
| 2784 | 2804 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2741,31 +2741,51 @@ | |
| 2741 | } while ( g.fSshClient & CGI_SSH_FOSSIL || |
| 2742 | g.fSshClient & CGI_SSH_COMPAT ); |
| 2743 | } |
| 2744 | |
| 2745 | /* |
| 2746 | ** Note that the following command is used by ssh:// processing. |
| 2747 | ** |
| 2748 | ** COMMAND: test-http |
| 2749 | ** |
| 2750 | ** Works like the [[http]] command but gives setup permission to all users. |
| 2751 | ** |
| 2752 | ** Options: |
| 2753 | ** --th-trace Trace TH1 execution (for debugging purposes) |
| 2754 | ** --usercap CAP User capability string (Default: "sxy") |
| 2755 | ** |
| 2756 | */ |
| 2757 | void cmd_test_http(void){ |
| 2758 | const char *zIpAddr; /* IP address of remote client */ |
| 2759 | const char *zUserCap; |
| 2760 | |
| 2761 | Th_InitTraceLog(); |
| 2762 | zUserCap = find_option("usercap",0,1); |
| 2763 | if( zUserCap==0 ){ |
| 2764 | g.useLocalauth = 1; |
| 2765 | zUserCap = "sxy"; |
| 2766 | } |
| 2767 | login_set_capabilities(zUserCap, 0); |
| 2768 | g.httpIn = stdin; |
| 2769 | g.httpOut = stdout; |
| 2770 | fossil_binary_mode(g.httpOut); |
| 2771 | fossil_binary_mode(g.httpIn); |
| @@ -2773,11 +2793,11 @@ | |
| 2773 | find_server_repository(2, 0); |
| 2774 | g.cgiOutput = 1; |
| 2775 | g.fNoHttpCompress = 1; |
| 2776 | g.fullHttpReply = 1; |
| 2777 | g.sslNotAvailable = 1; /* Avoid attempts to redirect */ |
| 2778 | zIpAddr = cgi_ssh_remote_addr(0); |
| 2779 | if( zIpAddr && zIpAddr[0] ){ |
| 2780 | g.fSshClient |= CGI_SSH_CLIENT; |
| 2781 | ssh_request_loop(zIpAddr, 0); |
| 2782 | }else{ |
| 2783 | cgi_set_parameter("REMOTE_ADDR", "127.0.0.1"); |
| 2784 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2741,31 +2741,51 @@ | |
| 2741 | } while ( g.fSshClient & CGI_SSH_FOSSIL || |
| 2742 | g.fSshClient & CGI_SSH_COMPAT ); |
| 2743 | } |
| 2744 | |
| 2745 | /* |
| 2746 | ** COMMAND: test-http |
| 2747 | ** |
| 2748 | ** Works like the [[http]] command but gives setup permission to all users, |
| 2749 | ** or whatever permission is described by "--usercap CAP". |
| 2750 | ** |
| 2751 | ** This command can used for interactive debugging of web pages. For |
| 2752 | ** example, one can put a simple HTTP request in a file like this: |
| 2753 | ** |
| 2754 | ** echo 'GET /timeline' >request.txt |
| 2755 | ** |
| 2756 | ** Then run (in a debugger) a command like this: |
| 2757 | ** |
| 2758 | ** fossil test-http --debug <request.txt |
| 2759 | ** |
| 2760 | ** This command is also used internally by the "ssh" sync protocol. Some |
| 2761 | ** special processing to support sync happens when this command is run |
| 2762 | ** and the SSH_CONNECTION environment variable is set. Use the --test |
| 2763 | ** option on interactive sessions to avoid that special processing when |
| 2764 | ** using this command interactively over SSH. A better solution would be |
| 2765 | ** to use a different command for "ssh" sync, but we cannot do that without |
| 2766 | ** breaking legacy. |
| 2767 | ** |
| 2768 | ** Options: |
| 2769 | ** --test Do not do special "sync" processing when operating |
| 2770 | ** over an SSH link. |
| 2771 | ** --th-trace Trace TH1 execution (for debugging purposes) |
| 2772 | ** --usercap CAP User capability string (Default: "sxy") |
| 2773 | ** |
| 2774 | */ |
| 2775 | void cmd_test_http(void){ |
| 2776 | const char *zIpAddr; /* IP address of remote client */ |
| 2777 | const char *zUserCap; |
| 2778 | int bTest = 0; |
| 2779 | |
| 2780 | Th_InitTraceLog(); |
| 2781 | zUserCap = find_option("usercap",0,1); |
| 2782 | if( zUserCap==0 ){ |
| 2783 | g.useLocalauth = 1; |
| 2784 | zUserCap = "sxy"; |
| 2785 | } |
| 2786 | bTest = find_option("test",0,0)!=0; |
| 2787 | login_set_capabilities(zUserCap, 0); |
| 2788 | g.httpIn = stdin; |
| 2789 | g.httpOut = stdout; |
| 2790 | fossil_binary_mode(g.httpOut); |
| 2791 | fossil_binary_mode(g.httpIn); |
| @@ -2773,11 +2793,11 @@ | |
| 2793 | find_server_repository(2, 0); |
| 2794 | g.cgiOutput = 1; |
| 2795 | g.fNoHttpCompress = 1; |
| 2796 | g.fullHttpReply = 1; |
| 2797 | g.sslNotAvailable = 1; /* Avoid attempts to redirect */ |
| 2798 | zIpAddr = bTest ? 0 : cgi_ssh_remote_addr(0); |
| 2799 | if( zIpAddr && zIpAddr[0] ){ |
| 2800 | g.fSshClient |= CGI_SSH_CLIENT; |
| 2801 | ssh_request_loop(zIpAddr, 0); |
| 2802 | }else{ |
| 2803 | cgi_set_parameter("REMOTE_ADDR", "127.0.0.1"); |
| 2804 |
+18
-8
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -353,11 +353,13 @@ | ||
| 353 | 353 | md5sum_step_text(z, n-35); |
| 354 | 354 | zHash = md5sum_finish(0); |
| 355 | 355 | if( memcmp(&z[n-33], zHash, 32)==0 ){ |
| 356 | 356 | return 1; |
| 357 | 357 | }else{ |
| 358 | - blob_appendf(pErr, "incorrect Z-card cksum: expected %.32s", zHash); | |
| 358 | + if(pErr!=0){ | |
| 359 | + blob_appendf(pErr, "incorrect Z-card cksum: expected %.32s", zHash); | |
| 360 | + } | |
| 359 | 361 | return 2; |
| 360 | 362 | } |
| 361 | 363 | } |
| 362 | 364 | |
| 363 | 365 | /* |
| @@ -488,11 +490,13 @@ | ||
| 488 | 490 | if( !isRepeat ) g.parseCnt[0]++; |
| 489 | 491 | z = blob_materialize(pContent); |
| 490 | 492 | n = blob_size(pContent); |
| 491 | 493 | if( n<=0 || z[n-1]!='\n' ){ |
| 492 | 494 | blob_reset(pContent); |
| 493 | - blob_appendf(pErr, "%s", n ? "not terminated with \\n" : "zero-length"); | |
| 495 | + if(pErr!=0){ | |
| 496 | + blob_appendf(pErr, "%s", n ? "not terminated with \\n" : "zero-length"); | |
| 497 | + } | |
| 494 | 498 | return 0; |
| 495 | 499 | } |
| 496 | 500 | |
| 497 | 501 | /* Strip off the PGP signature if there is one. |
| 498 | 502 | */ |
| @@ -501,11 +505,13 @@ | ||
| 501 | 505 | /* Verify that the first few characters of the artifact look like |
| 502 | 506 | ** a control artifact. |
| 503 | 507 | */ |
| 504 | 508 | if( n<10 || z[0]<'A' || z[0]>'Z' || z[1]!=' ' ){ |
| 505 | 509 | blob_reset(pContent); |
| 506 | - blob_appendf(pErr, "line 1 not recognized"); | |
| 510 | + if(pErr!=0){ | |
| 511 | + blob_appendf(pErr, "line 1 not recognized"); | |
| 512 | + } | |
| 507 | 513 | return 0; |
| 508 | 514 | } |
| 509 | 515 | /* Then verify the Z-card. |
| 510 | 516 | */ |
| 511 | 517 | #if 1 |
| @@ -1122,18 +1128,22 @@ | ||
| 1122 | 1128 | |
| 1123 | 1129 | manifest_syntax_error: |
| 1124 | 1130 | { |
| 1125 | 1131 | char *zUuid = rid_to_uuid(rid); |
| 1126 | 1132 | if( zUuid ){ |
| 1127 | - blob_appendf(pErr, "artifact [%s] ", zUuid); | |
| 1133 | + if(pErr!=0){ | |
| 1134 | + blob_appendf(pErr, "artifact [%s] ", zUuid); | |
| 1135 | + } | |
| 1128 | 1136 | fossil_free(zUuid); |
| 1129 | 1137 | } |
| 1130 | 1138 | } |
| 1131 | - if( zErr ){ | |
| 1132 | - blob_appendf(pErr, "line %d: %s", lineNo, zErr); | |
| 1133 | - }else{ | |
| 1134 | - blob_appendf(pErr, "unknown error on line %d", lineNo); | |
| 1139 | + if(pErr!=0){ | |
| 1140 | + if( zErr ){ | |
| 1141 | + blob_appendf(pErr, "line %d: %s", lineNo, zErr); | |
| 1142 | + }else{ | |
| 1143 | + blob_appendf(pErr, "unknown error on line %d", lineNo); | |
| 1144 | + } | |
| 1135 | 1145 | } |
| 1136 | 1146 | md5sum_init(); |
| 1137 | 1147 | manifest_destroy(p); |
| 1138 | 1148 | return 0; |
| 1139 | 1149 | } |
| 1140 | 1150 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -353,11 +353,13 @@ | |
| 353 | md5sum_step_text(z, n-35); |
| 354 | zHash = md5sum_finish(0); |
| 355 | if( memcmp(&z[n-33], zHash, 32)==0 ){ |
| 356 | return 1; |
| 357 | }else{ |
| 358 | blob_appendf(pErr, "incorrect Z-card cksum: expected %.32s", zHash); |
| 359 | return 2; |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | /* |
| @@ -488,11 +490,13 @@ | |
| 488 | if( !isRepeat ) g.parseCnt[0]++; |
| 489 | z = blob_materialize(pContent); |
| 490 | n = blob_size(pContent); |
| 491 | if( n<=0 || z[n-1]!='\n' ){ |
| 492 | blob_reset(pContent); |
| 493 | blob_appendf(pErr, "%s", n ? "not terminated with \\n" : "zero-length"); |
| 494 | return 0; |
| 495 | } |
| 496 | |
| 497 | /* Strip off the PGP signature if there is one. |
| 498 | */ |
| @@ -501,11 +505,13 @@ | |
| 501 | /* Verify that the first few characters of the artifact look like |
| 502 | ** a control artifact. |
| 503 | */ |
| 504 | if( n<10 || z[0]<'A' || z[0]>'Z' || z[1]!=' ' ){ |
| 505 | blob_reset(pContent); |
| 506 | blob_appendf(pErr, "line 1 not recognized"); |
| 507 | return 0; |
| 508 | } |
| 509 | /* Then verify the Z-card. |
| 510 | */ |
| 511 | #if 1 |
| @@ -1122,18 +1128,22 @@ | |
| 1122 | |
| 1123 | manifest_syntax_error: |
| 1124 | { |
| 1125 | char *zUuid = rid_to_uuid(rid); |
| 1126 | if( zUuid ){ |
| 1127 | blob_appendf(pErr, "artifact [%s] ", zUuid); |
| 1128 | fossil_free(zUuid); |
| 1129 | } |
| 1130 | } |
| 1131 | if( zErr ){ |
| 1132 | blob_appendf(pErr, "line %d: %s", lineNo, zErr); |
| 1133 | }else{ |
| 1134 | blob_appendf(pErr, "unknown error on line %d", lineNo); |
| 1135 | } |
| 1136 | md5sum_init(); |
| 1137 | manifest_destroy(p); |
| 1138 | return 0; |
| 1139 | } |
| 1140 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -353,11 +353,13 @@ | |
| 353 | md5sum_step_text(z, n-35); |
| 354 | zHash = md5sum_finish(0); |
| 355 | if( memcmp(&z[n-33], zHash, 32)==0 ){ |
| 356 | return 1; |
| 357 | }else{ |
| 358 | if(pErr!=0){ |
| 359 | blob_appendf(pErr, "incorrect Z-card cksum: expected %.32s", zHash); |
| 360 | } |
| 361 | return 2; |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | /* |
| @@ -488,11 +490,13 @@ | |
| 490 | if( !isRepeat ) g.parseCnt[0]++; |
| 491 | z = blob_materialize(pContent); |
| 492 | n = blob_size(pContent); |
| 493 | if( n<=0 || z[n-1]!='\n' ){ |
| 494 | blob_reset(pContent); |
| 495 | if(pErr!=0){ |
| 496 | blob_appendf(pErr, "%s", n ? "not terminated with \\n" : "zero-length"); |
| 497 | } |
| 498 | return 0; |
| 499 | } |
| 500 | |
| 501 | /* Strip off the PGP signature if there is one. |
| 502 | */ |
| @@ -501,11 +505,13 @@ | |
| 505 | /* Verify that the first few characters of the artifact look like |
| 506 | ** a control artifact. |
| 507 | */ |
| 508 | if( n<10 || z[0]<'A' || z[0]>'Z' || z[1]!=' ' ){ |
| 509 | blob_reset(pContent); |
| 510 | if(pErr!=0){ |
| 511 | blob_appendf(pErr, "line 1 not recognized"); |
| 512 | } |
| 513 | return 0; |
| 514 | } |
| 515 | /* Then verify the Z-card. |
| 516 | */ |
| 517 | #if 1 |
| @@ -1122,18 +1128,22 @@ | |
| 1128 | |
| 1129 | manifest_syntax_error: |
| 1130 | { |
| 1131 | char *zUuid = rid_to_uuid(rid); |
| 1132 | if( zUuid ){ |
| 1133 | if(pErr!=0){ |
| 1134 | blob_appendf(pErr, "artifact [%s] ", zUuid); |
| 1135 | } |
| 1136 | fossil_free(zUuid); |
| 1137 | } |
| 1138 | } |
| 1139 | if(pErr!=0){ |
| 1140 | if( zErr ){ |
| 1141 | blob_appendf(pErr, "line %d: %s", lineNo, zErr); |
| 1142 | }else{ |
| 1143 | blob_appendf(pErr, "unknown error on line %d", lineNo); |
| 1144 | } |
| 1145 | } |
| 1146 | md5sum_init(); |
| 1147 | manifest_destroy(p); |
| 1148 | return 0; |
| 1149 | } |
| 1150 |
+3
| --- src/mkindex.c | ||
| +++ src/mkindex.c | ||
| @@ -91,10 +91,11 @@ | ||
| 91 | 91 | #define CMDFLAG_VERSIONABLE 0x0040 /* A versionable setting */ |
| 92 | 92 | #define CMDFLAG_BLOCKTEXT 0x0080 /* Multi-line text setting */ |
| 93 | 93 | #define CMDFLAG_BOOLEAN 0x0100 /* A boolean setting */ |
| 94 | 94 | #define CMDFLAG_RAWCONTENT 0x0200 /* Do not interpret webpage content */ |
| 95 | 95 | #define CMDFLAG_SENSITIVE 0x0400 /* Security-sensitive setting */ |
| 96 | +#define CMDFLAG_HIDDEN 0x0800 /* Elide from most listings */ | |
| 96 | 97 | /**************************************************************************/ |
| 97 | 98 | |
| 98 | 99 | /* |
| 99 | 100 | ** Each entry looks like this: |
| 100 | 101 | */ |
| @@ -257,10 +258,12 @@ | ||
| 257 | 258 | aEntry[nUsed].iWidth = atoi(&zLine[i+6]); |
| 258 | 259 | }else if( j>8 && strncmp(&zLine[i], "default=", 8)==0 ){ |
| 259 | 260 | aEntry[nUsed].zDflt = string_dup(&zLine[i+8], j-8); |
| 260 | 261 | }else if( j>9 && strncmp(&zLine[i], "variable=", 9)==0 ){ |
| 261 | 262 | aEntry[nUsed].zVar = string_dup(&zLine[i+9], j-9); |
| 263 | + }else if( j==6 && strncmp(&zLine[i], "hidden", 6)==0 ){ | |
| 264 | + aEntry[nUsed].eType |= CMDFLAG_HIDDEN; | |
| 262 | 265 | }else{ |
| 263 | 266 | fprintf(stderr, "%s:%d: unknown option: '%.*s'\n", |
| 264 | 267 | zFile, nLine, j, &zLine[i]); |
| 265 | 268 | nErr++; |
| 266 | 269 | } |
| 267 | 270 |
| --- src/mkindex.c | |
| +++ src/mkindex.c | |
| @@ -91,10 +91,11 @@ | |
| 91 | #define CMDFLAG_VERSIONABLE 0x0040 /* A versionable setting */ |
| 92 | #define CMDFLAG_BLOCKTEXT 0x0080 /* Multi-line text setting */ |
| 93 | #define CMDFLAG_BOOLEAN 0x0100 /* A boolean setting */ |
| 94 | #define CMDFLAG_RAWCONTENT 0x0200 /* Do not interpret webpage content */ |
| 95 | #define CMDFLAG_SENSITIVE 0x0400 /* Security-sensitive setting */ |
| 96 | /**************************************************************************/ |
| 97 | |
| 98 | /* |
| 99 | ** Each entry looks like this: |
| 100 | */ |
| @@ -257,10 +258,12 @@ | |
| 257 | aEntry[nUsed].iWidth = atoi(&zLine[i+6]); |
| 258 | }else if( j>8 && strncmp(&zLine[i], "default=", 8)==0 ){ |
| 259 | aEntry[nUsed].zDflt = string_dup(&zLine[i+8], j-8); |
| 260 | }else if( j>9 && strncmp(&zLine[i], "variable=", 9)==0 ){ |
| 261 | aEntry[nUsed].zVar = string_dup(&zLine[i+9], j-9); |
| 262 | }else{ |
| 263 | fprintf(stderr, "%s:%d: unknown option: '%.*s'\n", |
| 264 | zFile, nLine, j, &zLine[i]); |
| 265 | nErr++; |
| 266 | } |
| 267 |
| --- src/mkindex.c | |
| +++ src/mkindex.c | |
| @@ -91,10 +91,11 @@ | |
| 91 | #define CMDFLAG_VERSIONABLE 0x0040 /* A versionable setting */ |
| 92 | #define CMDFLAG_BLOCKTEXT 0x0080 /* Multi-line text setting */ |
| 93 | #define CMDFLAG_BOOLEAN 0x0100 /* A boolean setting */ |
| 94 | #define CMDFLAG_RAWCONTENT 0x0200 /* Do not interpret webpage content */ |
| 95 | #define CMDFLAG_SENSITIVE 0x0400 /* Security-sensitive setting */ |
| 96 | #define CMDFLAG_HIDDEN 0x0800 /* Elide from most listings */ |
| 97 | /**************************************************************************/ |
| 98 | |
| 99 | /* |
| 100 | ** Each entry looks like this: |
| 101 | */ |
| @@ -257,10 +258,12 @@ | |
| 258 | aEntry[nUsed].iWidth = atoi(&zLine[i+6]); |
| 259 | }else if( j>8 && strncmp(&zLine[i], "default=", 8)==0 ){ |
| 260 | aEntry[nUsed].zDflt = string_dup(&zLine[i+8], j-8); |
| 261 | }else if( j>9 && strncmp(&zLine[i], "variable=", 9)==0 ){ |
| 262 | aEntry[nUsed].zVar = string_dup(&zLine[i+9], j-9); |
| 263 | }else if( j==6 && strncmp(&zLine[i], "hidden", 6)==0 ){ |
| 264 | aEntry[nUsed].eType |= CMDFLAG_HIDDEN; |
| 265 | }else{ |
| 266 | fprintf(stderr, "%s:%d: unknown option: '%.*s'\n", |
| 267 | zFile, nLine, j, &zLine[i]); |
| 268 | nErr++; |
| 269 | } |
| 270 |
+1
-1
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -1189,11 +1189,11 @@ | ||
| 1189 | 1189 | cgi_set_content_type("application/json"); |
| 1190 | 1190 | wiki_render_page_list_json(verbose, includeContent); |
| 1191 | 1191 | } |
| 1192 | 1192 | |
| 1193 | 1193 | /* |
| 1194 | -** WEBPAGE: wikiajax | |
| 1194 | +** WEBPAGE: wikiajax hidden | |
| 1195 | 1195 | ** |
| 1196 | 1196 | ** An internal dispatcher for wiki AJAX operations. Not for direct |
| 1197 | 1197 | ** client use. All routes defined by this interface are app-internal, |
| 1198 | 1198 | ** subject to change |
| 1199 | 1199 | */ |
| 1200 | 1200 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | cgi_set_content_type("application/json"); |
| 1190 | wiki_render_page_list_json(verbose, includeContent); |
| 1191 | } |
| 1192 | |
| 1193 | /* |
| 1194 | ** WEBPAGE: wikiajax |
| 1195 | ** |
| 1196 | ** An internal dispatcher for wiki AJAX operations. Not for direct |
| 1197 | ** client use. All routes defined by this interface are app-internal, |
| 1198 | ** subject to change |
| 1199 | */ |
| 1200 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | cgi_set_content_type("application/json"); |
| 1190 | wiki_render_page_list_json(verbose, includeContent); |
| 1191 | } |
| 1192 | |
| 1193 | /* |
| 1194 | ** WEBPAGE: wikiajax hidden |
| 1195 | ** |
| 1196 | ** An internal dispatcher for wiki AJAX operations. Not for direct |
| 1197 | ** client use. All routes defined by this interface are app-internal, |
| 1198 | ** subject to change |
| 1199 | */ |
| 1200 |
+1
-1
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -1189,11 +1189,11 @@ | ||
| 1189 | 1189 | cgi_set_content_type("application/json"); |
| 1190 | 1190 | wiki_render_page_list_json(verbose, includeContent); |
| 1191 | 1191 | } |
| 1192 | 1192 | |
| 1193 | 1193 | /* |
| 1194 | -** WEBPAGE: wikiajax | |
| 1194 | +** WEBPAGE: wikiajax hidden | |
| 1195 | 1195 | ** |
| 1196 | 1196 | ** An internal dispatcher for wiki AJAX operations. Not for direct |
| 1197 | 1197 | ** client use. All routes defined by this interface are app-internal, |
| 1198 | 1198 | ** subject to change |
| 1199 | 1199 | */ |
| 1200 | 1200 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | cgi_set_content_type("application/json"); |
| 1190 | wiki_render_page_list_json(verbose, includeContent); |
| 1191 | } |
| 1192 | |
| 1193 | /* |
| 1194 | ** WEBPAGE: wikiajax |
| 1195 | ** |
| 1196 | ** An internal dispatcher for wiki AJAX operations. Not for direct |
| 1197 | ** client use. All routes defined by this interface are app-internal, |
| 1198 | ** subject to change |
| 1199 | */ |
| 1200 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | cgi_set_content_type("application/json"); |
| 1190 | wiki_render_page_list_json(verbose, includeContent); |
| 1191 | } |
| 1192 | |
| 1193 | /* |
| 1194 | ** WEBPAGE: wikiajax hidden |
| 1195 | ** |
| 1196 | ** An internal dispatcher for wiki AJAX operations. Not for direct |
| 1197 | ** client use. All routes defined by this interface are app-internal, |
| 1198 | ** subject to change |
| 1199 | */ |
| 1200 |