Fossil SCM
Pull in the latest changes from trunk.
Commit
97311bd9d53fd05e3ad4c86a95f0d396f431b311
Parent
652f20ef9c55a69…
14 files changed
+2
-1
+1
+3
-2
+1
-1
+1
-1
+5
-5
+17
+1
+5
-3
+3
-3
+1
-1
+4
-1
+4
-1
+1
-1
+2
-1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -311,16 +311,17 @@ | ||
| 311 | 311 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 312 | 312 | time_t expires = time(0) + 604800; |
| 313 | 313 | char * zDate = cgi_rfc822_datestamp(expires); |
| 314 | 314 | fprintf(g.httpOut, "Expires: %s\r\n", zDate ); |
| 315 | 315 | if( zDate[0] ) free( zDate ); |
| 316 | + }else{ | |
| 317 | + fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); | |
| 316 | 318 | } |
| 317 | 319 | |
| 318 | 320 | /* Content intended for logged in users should only be cached in |
| 319 | 321 | ** the browser, not some shared location. |
| 320 | 322 | */ |
| 321 | - fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); | |
| 322 | 323 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 323 | 324 | if( strcmp(zContentType,"application/x-fossil")==0 ){ |
| 324 | 325 | cgi_combine_header_and_body(); |
| 325 | 326 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 326 | 327 | } |
| 327 | 328 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -311,16 +311,17 @@ | |
| 311 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 312 | time_t expires = time(0) + 604800; |
| 313 | char * zDate = cgi_rfc822_datestamp(expires); |
| 314 | fprintf(g.httpOut, "Expires: %s\r\n", zDate ); |
| 315 | if( zDate[0] ) free( zDate ); |
| 316 | } |
| 317 | |
| 318 | /* Content intended for logged in users should only be cached in |
| 319 | ** the browser, not some shared location. |
| 320 | */ |
| 321 | fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); |
| 322 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 323 | if( strcmp(zContentType,"application/x-fossil")==0 ){ |
| 324 | cgi_combine_header_and_body(); |
| 325 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 326 | } |
| 327 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -311,16 +311,17 @@ | |
| 311 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 312 | time_t expires = time(0) + 604800; |
| 313 | char * zDate = cgi_rfc822_datestamp(expires); |
| 314 | fprintf(g.httpOut, "Expires: %s\r\n", zDate ); |
| 315 | if( zDate[0] ) free( zDate ); |
| 316 | }else{ |
| 317 | fprintf(g.httpOut, "Cache-control: no-cache, no-store\r\n"); |
| 318 | } |
| 319 | |
| 320 | /* Content intended for logged in users should only be cached in |
| 321 | ** the browser, not some shared location. |
| 322 | */ |
| 323 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 324 | if( strcmp(zContentType,"application/x-fossil")==0 ){ |
| 325 | cgi_combine_header_and_body(); |
| 326 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 327 | } |
| 328 |
+1
| --- src/doc.c | ||
| +++ src/doc.c | ||
| @@ -561,6 +561,7 @@ | ||
| 561 | 561 | if( blob_size(&logo)==0 ){ |
| 562 | 562 | blob_init(&logo, (char*)aLogo, sizeof(aLogo)); |
| 563 | 563 | } |
| 564 | 564 | cgi_set_content_type(zMime); |
| 565 | 565 | cgi_set_content(&logo); |
| 566 | + g.isConst = 1; | |
| 566 | 567 | } |
| 567 | 568 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -561,6 +561,7 @@ | |
| 561 | if( blob_size(&logo)==0 ){ |
| 562 | blob_init(&logo, (char*)aLogo, sizeof(aLogo)); |
| 563 | } |
| 564 | cgi_set_content_type(zMime); |
| 565 | cgi_set_content(&logo); |
| 566 | } |
| 567 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -561,6 +561,7 @@ | |
| 561 | if( blob_size(&logo)==0 ){ |
| 562 | blob_init(&logo, (char*)aLogo, sizeof(aLogo)); |
| 563 | } |
| 564 | cgi_set_content_type(zMime); |
| 565 | cgi_set_content(&logo); |
| 566 | g.isConst = 1; |
| 567 | } |
| 568 |
+3
-2
| --- src/http.c | ||
| +++ src/http.c | ||
| @@ -125,11 +125,11 @@ | ||
| 125 | 125 | ** |
| 126 | 126 | ** The server address is contain in the "g" global structure. The |
| 127 | 127 | ** url_parse() routine should have been called prior to this routine |
| 128 | 128 | ** in order to fill this structure appropriately. |
| 129 | 129 | */ |
| 130 | -void http_exchange(Blob *pSend, Blob *pReply){ | |
| 130 | +void http_exchange(Blob *pSend, Blob *pReply, int useLogin){ | |
| 131 | 131 | Blob login; /* The login card */ |
| 132 | 132 | Blob payload; /* The complete payload including login card */ |
| 133 | 133 | Blob hdr; /* The HTTP request header */ |
| 134 | 134 | int closeConnection; /* True to close the connection when done */ |
| 135 | 135 | int iLength; /* Length of the reply payload */ |
| @@ -141,11 +141,12 @@ | ||
| 141 | 141 | if( transport_open() ){ |
| 142 | 142 | fossil_fatal(transport_errmsg()); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /* Construct the login card and prepare the complete payload */ |
| 146 | - http_build_login_card(pSend, &login); | |
| 146 | + blob_zero(&login); | |
| 147 | + if( useLogin ) http_build_login_card(pSend, &login); | |
| 147 | 148 | if( g.fHttpTrace ){ |
| 148 | 149 | payload = login; |
| 149 | 150 | blob_append(&payload, blob_buffer(pSend), blob_size(pSend)); |
| 150 | 151 | }else{ |
| 151 | 152 | blob_compress2(&login, pSend, &payload); |
| 152 | 153 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -125,11 +125,11 @@ | |
| 125 | ** |
| 126 | ** The server address is contain in the "g" global structure. The |
| 127 | ** url_parse() routine should have been called prior to this routine |
| 128 | ** in order to fill this structure appropriately. |
| 129 | */ |
| 130 | void http_exchange(Blob *pSend, Blob *pReply){ |
| 131 | Blob login; /* The login card */ |
| 132 | Blob payload; /* The complete payload including login card */ |
| 133 | Blob hdr; /* The HTTP request header */ |
| 134 | int closeConnection; /* True to close the connection when done */ |
| 135 | int iLength; /* Length of the reply payload */ |
| @@ -141,11 +141,12 @@ | |
| 141 | if( transport_open() ){ |
| 142 | fossil_fatal(transport_errmsg()); |
| 143 | } |
| 144 | |
| 145 | /* Construct the login card and prepare the complete payload */ |
| 146 | http_build_login_card(pSend, &login); |
| 147 | if( g.fHttpTrace ){ |
| 148 | payload = login; |
| 149 | blob_append(&payload, blob_buffer(pSend), blob_size(pSend)); |
| 150 | }else{ |
| 151 | blob_compress2(&login, pSend, &payload); |
| 152 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -125,11 +125,11 @@ | |
| 125 | ** |
| 126 | ** The server address is contain in the "g" global structure. The |
| 127 | ** url_parse() routine should have been called prior to this routine |
| 128 | ** in order to fill this structure appropriately. |
| 129 | */ |
| 130 | void http_exchange(Blob *pSend, Blob *pReply, int useLogin){ |
| 131 | Blob login; /* The login card */ |
| 132 | Blob payload; /* The complete payload including login card */ |
| 133 | Blob hdr; /* The HTTP request header */ |
| 134 | int closeConnection; /* True to close the connection when done */ |
| 135 | int iLength; /* Length of the reply payload */ |
| @@ -141,11 +141,12 @@ | |
| 141 | if( transport_open() ){ |
| 142 | fossil_fatal(transport_errmsg()); |
| 143 | } |
| 144 | |
| 145 | /* Construct the login card and prepare the complete payload */ |
| 146 | blob_zero(&login); |
| 147 | if( useLogin ) http_build_login_card(pSend, &login); |
| 148 | if( g.fHttpTrace ){ |
| 149 | payload = login; |
| 150 | blob_append(&payload, blob_buffer(pSend), blob_size(pSend)); |
| 151 | }else{ |
| 152 | blob_compress2(&login, pSend, &payload); |
| 153 |
+1
-1
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -472,11 +472,11 @@ | ||
| 472 | 472 | static char *zUser = 0; |
| 473 | 473 | int i; |
| 474 | 474 | for(i=0; zCap[i]; i++){ |
| 475 | 475 | switch( zCap[i] ){ |
| 476 | 476 | case 's': g.okSetup = 1; /* Fall thru into Admin */ |
| 477 | - case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = | |
| 477 | + case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = g.okZip = | |
| 478 | 478 | g.okRdWiki = g.okWrWiki = g.okNewWiki = |
| 479 | 479 | g.okApndWiki = g.okHistory = g.okClone = |
| 480 | 480 | g.okNewTkt = g.okPassword = g.okRdAddr = |
| 481 | 481 | g.okTktFmt = 1; /* Fall thru into Read/Write */ |
| 482 | 482 | case 'i': g.okRead = g.okWrite = 1; break; |
| 483 | 483 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -472,11 +472,11 @@ | |
| 472 | static char *zUser = 0; |
| 473 | int i; |
| 474 | for(i=0; zCap[i]; i++){ |
| 475 | switch( zCap[i] ){ |
| 476 | case 's': g.okSetup = 1; /* Fall thru into Admin */ |
| 477 | case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = |
| 478 | g.okRdWiki = g.okWrWiki = g.okNewWiki = |
| 479 | g.okApndWiki = g.okHistory = g.okClone = |
| 480 | g.okNewTkt = g.okPassword = g.okRdAddr = |
| 481 | g.okTktFmt = 1; /* Fall thru into Read/Write */ |
| 482 | case 'i': g.okRead = g.okWrite = 1; break; |
| 483 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -472,11 +472,11 @@ | |
| 472 | static char *zUser = 0; |
| 473 | int i; |
| 474 | for(i=0; zCap[i]; i++){ |
| 475 | switch( zCap[i] ){ |
| 476 | case 's': g.okSetup = 1; /* Fall thru into Admin */ |
| 477 | case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = g.okZip = |
| 478 | g.okRdWiki = g.okWrWiki = g.okNewWiki = |
| 479 | g.okApndWiki = g.okHistory = g.okClone = |
| 480 | g.okNewTkt = g.okPassword = g.okRdAddr = |
| 481 | g.okTktFmt = 1; /* Fall thru into Read/Write */ |
| 482 | case 'i': g.okRead = g.okWrite = 1; break; |
| 483 |
+1
-1
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -386,11 +386,11 @@ | ||
| 386 | 386 | if( p->zWikiTitle!=0 ) goto manifest_syntax_error; |
| 387 | 387 | if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error; |
| 388 | 388 | if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error; |
| 389 | 389 | p->zWikiTitle = blob_terminate(&a1); |
| 390 | 390 | defossilize(p->zWikiTitle); |
| 391 | - if( !wiki_name_is_wellformed(p->zWikiTitle) ){ | |
| 391 | + if( !wiki_name_is_wellformed((const unsigned char *)p->zWikiTitle) ){ | |
| 392 | 392 | goto manifest_syntax_error; |
| 393 | 393 | } |
| 394 | 394 | break; |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -386,11 +386,11 @@ | |
| 386 | if( p->zWikiTitle!=0 ) goto manifest_syntax_error; |
| 387 | if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error; |
| 388 | if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error; |
| 389 | p->zWikiTitle = blob_terminate(&a1); |
| 390 | defossilize(p->zWikiTitle); |
| 391 | if( !wiki_name_is_wellformed(p->zWikiTitle) ){ |
| 392 | goto manifest_syntax_error; |
| 393 | } |
| 394 | break; |
| 395 | } |
| 396 | |
| 397 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -386,11 +386,11 @@ | |
| 386 | if( p->zWikiTitle!=0 ) goto manifest_syntax_error; |
| 387 | if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error; |
| 388 | if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error; |
| 389 | p->zWikiTitle = blob_terminate(&a1); |
| 390 | defossilize(p->zWikiTitle); |
| 391 | if( !wiki_name_is_wellformed((const unsigned char *)p->zWikiTitle) ){ |
| 392 | goto manifest_syntax_error; |
| 393 | } |
| 394 | break; |
| 395 | } |
| 396 | |
| 397 |
+5
-5
| --- src/rss.c | ||
| +++ src/rss.c | ||
| @@ -73,13 +73,13 @@ | ||
| 73 | 73 | zPubDate = cgi_rfc822_datestamp(time(NULL)); |
| 74 | 74 | |
| 75 | 75 | @ <?xml version="1.0"?> |
| 76 | 76 | @ <rss version="2.0"> |
| 77 | 77 | @ <channel> |
| 78 | - @ <title>%s(zProjectName)</title> | |
| 78 | + @ <title>%h(zProjectName)</title> | |
| 79 | 79 | @ <link>%s(g.zBaseURL)</link> |
| 80 | - @ <description>%s(zProjectDescr)</description> | |
| 80 | + @ <description>%h(zProjectDescr)</description> | |
| 81 | 81 | @ <pubDate>%s(zPubDate)</pubDate> |
| 82 | 82 | @ <generator>Fossil version %s(MANIFEST_VERSION) %s(MANIFEST_DATE)</generator> |
| 83 | 83 | db_prepare(&q, blob_buffer(&bSQL)); |
| 84 | 84 | blob_reset( &bSQL ); |
| 85 | 85 | while( db_step(&q)==SQLITE_ROW && nLine<=20 ){ |
| @@ -102,15 +102,15 @@ | ||
| 102 | 102 | }else if( nChild>1 ){ |
| 103 | 103 | zPrefix = "*FORK* "; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | @ <item> |
| 107 | - @ <title>%s(zPrefix)%s(zCom)</title> | |
| 107 | + @ <title>%h(zPrefix)%s(zCom)</title> | |
| 108 | 108 | @ <link>%s(g.zBaseURL)/ci/%s(zId)</link> |
| 109 | - @ <description>%s(zPrefix)%s(zCom)</description> | |
| 109 | + @ <description>%s(zPrefix)%h(zCom)</description> | |
| 110 | 110 | @ <pubDate>%s(zDate)</pubDate> |
| 111 | - @ <author>%s(zAuthor)</author> | |
| 111 | + @ <author>%h(zAuthor)</author> | |
| 112 | 112 | @ <guid>%s(g.zBaseURL)/ci/%s(zId)</guid> |
| 113 | 113 | @ </item> |
| 114 | 114 | free(zDate); |
| 115 | 115 | nLine++; |
| 116 | 116 | } |
| 117 | 117 |
| --- src/rss.c | |
| +++ src/rss.c | |
| @@ -73,13 +73,13 @@ | |
| 73 | zPubDate = cgi_rfc822_datestamp(time(NULL)); |
| 74 | |
| 75 | @ <?xml version="1.0"?> |
| 76 | @ <rss version="2.0"> |
| 77 | @ <channel> |
| 78 | @ <title>%s(zProjectName)</title> |
| 79 | @ <link>%s(g.zBaseURL)</link> |
| 80 | @ <description>%s(zProjectDescr)</description> |
| 81 | @ <pubDate>%s(zPubDate)</pubDate> |
| 82 | @ <generator>Fossil version %s(MANIFEST_VERSION) %s(MANIFEST_DATE)</generator> |
| 83 | db_prepare(&q, blob_buffer(&bSQL)); |
| 84 | blob_reset( &bSQL ); |
| 85 | while( db_step(&q)==SQLITE_ROW && nLine<=20 ){ |
| @@ -102,15 +102,15 @@ | |
| 102 | }else if( nChild>1 ){ |
| 103 | zPrefix = "*FORK* "; |
| 104 | } |
| 105 | |
| 106 | @ <item> |
| 107 | @ <title>%s(zPrefix)%s(zCom)</title> |
| 108 | @ <link>%s(g.zBaseURL)/ci/%s(zId)</link> |
| 109 | @ <description>%s(zPrefix)%s(zCom)</description> |
| 110 | @ <pubDate>%s(zDate)</pubDate> |
| 111 | @ <author>%s(zAuthor)</author> |
| 112 | @ <guid>%s(g.zBaseURL)/ci/%s(zId)</guid> |
| 113 | @ </item> |
| 114 | free(zDate); |
| 115 | nLine++; |
| 116 | } |
| 117 |
| --- src/rss.c | |
| +++ src/rss.c | |
| @@ -73,13 +73,13 @@ | |
| 73 | zPubDate = cgi_rfc822_datestamp(time(NULL)); |
| 74 | |
| 75 | @ <?xml version="1.0"?> |
| 76 | @ <rss version="2.0"> |
| 77 | @ <channel> |
| 78 | @ <title>%h(zProjectName)</title> |
| 79 | @ <link>%s(g.zBaseURL)</link> |
| 80 | @ <description>%h(zProjectDescr)</description> |
| 81 | @ <pubDate>%s(zPubDate)</pubDate> |
| 82 | @ <generator>Fossil version %s(MANIFEST_VERSION) %s(MANIFEST_DATE)</generator> |
| 83 | db_prepare(&q, blob_buffer(&bSQL)); |
| 84 | blob_reset( &bSQL ); |
| 85 | while( db_step(&q)==SQLITE_ROW && nLine<=20 ){ |
| @@ -102,15 +102,15 @@ | |
| 102 | }else if( nChild>1 ){ |
| 103 | zPrefix = "*FORK* "; |
| 104 | } |
| 105 | |
| 106 | @ <item> |
| 107 | @ <title>%h(zPrefix)%s(zCom)</title> |
| 108 | @ <link>%s(g.zBaseURL)/ci/%s(zId)</link> |
| 109 | @ <description>%s(zPrefix)%h(zCom)</description> |
| 110 | @ <pubDate>%s(zDate)</pubDate> |
| 111 | @ <author>%h(zAuthor)</author> |
| 112 | @ <guid>%s(g.zBaseURL)/ci/%s(zId)</guid> |
| 113 | @ </item> |
| 114 | free(zDate); |
| 115 | nLine++; |
| 116 | } |
| 117 |
+17
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -962,22 +962,30 @@ | ||
| 962 | 962 | } |
| 963 | 963 | db_begin_transaction(); |
| 964 | 964 | if( P("clear")!=0 ){ |
| 965 | 965 | db_multi_exec("DELETE FROM config WHERE name='css'"); |
| 966 | 966 | cgi_replace_parameter("css", zDefaultCSS); |
| 967 | + db_end_transaction(0); | |
| 968 | + cgi_redirect("setup_editcss"); | |
| 967 | 969 | }else{ |
| 968 | 970 | textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS); |
| 969 | 971 | } |
| 972 | + if( P("submit")!=0 ){ | |
| 973 | + db_end_transaction(0); | |
| 974 | + cgi_redirect("setup_editcss"); | |
| 975 | + } | |
| 970 | 976 | style_header("Edit CSS"); |
| 971 | 977 | @ <form action="%s(g.zBaseURL)/setup_editcss" method="POST"> |
| 972 | 978 | login_insert_csrf_secret(); |
| 973 | 979 | @ Edit the CSS below:<br /> |
| 974 | 980 | textarea_attribute("", 40, 80, "css", "css", zDefaultCSS); |
| 975 | 981 | @ <br /> |
| 976 | 982 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 977 | 983 | @ <input type="submit" name="clear" value="Revert To Default"> |
| 978 | 984 | @ </form> |
| 985 | + @ <p><b>Note:</b> Press your browser Reload button after modifying the | |
| 986 | + @ CSS in order to pull in the modified CSS file.</p> | |
| 979 | 987 | @ <hr> |
| 980 | 988 | @ The default CSS is shown below for reference. Other examples |
| 981 | 989 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 982 | 990 | @ See also the <a href="setup_header">header</a> and |
| 983 | 991 | @ <a href="setup_footer">footer</a> editing screens. |
| @@ -1091,14 +1099,18 @@ | ||
| 1091 | 1099 | db_finalize(&ins); |
| 1092 | 1100 | db_multi_exec( |
| 1093 | 1101 | "REPLACE INTO config(name, value) VALUES('logo-mimetype',%Q)", |
| 1094 | 1102 | zMime |
| 1095 | 1103 | ); |
| 1104 | + db_end_transaction(0); | |
| 1105 | + cgi_redirect("setup_logo"); | |
| 1096 | 1106 | }else if( P("clr")!=0 ){ |
| 1097 | 1107 | db_multi_exec( |
| 1098 | 1108 | "DELETE FROM config WHERE name GLOB 'logo-*'" |
| 1099 | 1109 | ); |
| 1110 | + db_end_transaction(0); | |
| 1111 | + cgi_redirect("setup_logo"); | |
| 1100 | 1112 | } |
| 1101 | 1113 | style_header("Edit Project Logo"); |
| 1102 | 1114 | @ <p>The current project logo has a MIME-Type of <b>%h(zMime)</b> and looks |
| 1103 | 1115 | @ like this:</p> |
| 1104 | 1116 | @ <blockquote><img src="%s(g.zTop)/logo" alt="logo"></blockquote> |
| @@ -1117,8 +1129,13 @@ | ||
| 1117 | 1129 | @ Logo Image file: |
| 1118 | 1130 | @ <input type="file" name="im" size="60" accepts="image/*"><br> |
| 1119 | 1131 | @ <input type="submit" name="set" value="Change Logo"> |
| 1120 | 1132 | @ <input type="submit" name="clr" value="Revert To Default"> |
| 1121 | 1133 | @ </form> |
| 1134 | + @ | |
| 1135 | + @ <p><b>Note:</b> Your browser has probably cached the logo image, so | |
| 1136 | + @ you will probably need to press the Reload button on your browser after | |
| 1137 | + @ changing the logo to provoke your browser to reload the new logo image. | |
| 1138 | + @ </p> | |
| 1122 | 1139 | style_footer(); |
| 1123 | 1140 | db_end_transaction(0); |
| 1124 | 1141 | } |
| 1125 | 1142 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -962,22 +962,30 @@ | |
| 962 | } |
| 963 | db_begin_transaction(); |
| 964 | if( P("clear")!=0 ){ |
| 965 | db_multi_exec("DELETE FROM config WHERE name='css'"); |
| 966 | cgi_replace_parameter("css", zDefaultCSS); |
| 967 | }else{ |
| 968 | textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS); |
| 969 | } |
| 970 | style_header("Edit CSS"); |
| 971 | @ <form action="%s(g.zBaseURL)/setup_editcss" method="POST"> |
| 972 | login_insert_csrf_secret(); |
| 973 | @ Edit the CSS below:<br /> |
| 974 | textarea_attribute("", 40, 80, "css", "css", zDefaultCSS); |
| 975 | @ <br /> |
| 976 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 977 | @ <input type="submit" name="clear" value="Revert To Default"> |
| 978 | @ </form> |
| 979 | @ <hr> |
| 980 | @ The default CSS is shown below for reference. Other examples |
| 981 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 982 | @ See also the <a href="setup_header">header</a> and |
| 983 | @ <a href="setup_footer">footer</a> editing screens. |
| @@ -1091,14 +1099,18 @@ | |
| 1091 | db_finalize(&ins); |
| 1092 | db_multi_exec( |
| 1093 | "REPLACE INTO config(name, value) VALUES('logo-mimetype',%Q)", |
| 1094 | zMime |
| 1095 | ); |
| 1096 | }else if( P("clr")!=0 ){ |
| 1097 | db_multi_exec( |
| 1098 | "DELETE FROM config WHERE name GLOB 'logo-*'" |
| 1099 | ); |
| 1100 | } |
| 1101 | style_header("Edit Project Logo"); |
| 1102 | @ <p>The current project logo has a MIME-Type of <b>%h(zMime)</b> and looks |
| 1103 | @ like this:</p> |
| 1104 | @ <blockquote><img src="%s(g.zTop)/logo" alt="logo"></blockquote> |
| @@ -1117,8 +1129,13 @@ | |
| 1117 | @ Logo Image file: |
| 1118 | @ <input type="file" name="im" size="60" accepts="image/*"><br> |
| 1119 | @ <input type="submit" name="set" value="Change Logo"> |
| 1120 | @ <input type="submit" name="clr" value="Revert To Default"> |
| 1121 | @ </form> |
| 1122 | style_footer(); |
| 1123 | db_end_transaction(0); |
| 1124 | } |
| 1125 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -962,22 +962,30 @@ | |
| 962 | } |
| 963 | db_begin_transaction(); |
| 964 | if( P("clear")!=0 ){ |
| 965 | db_multi_exec("DELETE FROM config WHERE name='css'"); |
| 966 | cgi_replace_parameter("css", zDefaultCSS); |
| 967 | db_end_transaction(0); |
| 968 | cgi_redirect("setup_editcss"); |
| 969 | }else{ |
| 970 | textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS); |
| 971 | } |
| 972 | if( P("submit")!=0 ){ |
| 973 | db_end_transaction(0); |
| 974 | cgi_redirect("setup_editcss"); |
| 975 | } |
| 976 | style_header("Edit CSS"); |
| 977 | @ <form action="%s(g.zBaseURL)/setup_editcss" method="POST"> |
| 978 | login_insert_csrf_secret(); |
| 979 | @ Edit the CSS below:<br /> |
| 980 | textarea_attribute("", 40, 80, "css", "css", zDefaultCSS); |
| 981 | @ <br /> |
| 982 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 983 | @ <input type="submit" name="clear" value="Revert To Default"> |
| 984 | @ </form> |
| 985 | @ <p><b>Note:</b> Press your browser Reload button after modifying the |
| 986 | @ CSS in order to pull in the modified CSS file.</p> |
| 987 | @ <hr> |
| 988 | @ The default CSS is shown below for reference. Other examples |
| 989 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 990 | @ See also the <a href="setup_header">header</a> and |
| 991 | @ <a href="setup_footer">footer</a> editing screens. |
| @@ -1091,14 +1099,18 @@ | |
| 1099 | db_finalize(&ins); |
| 1100 | db_multi_exec( |
| 1101 | "REPLACE INTO config(name, value) VALUES('logo-mimetype',%Q)", |
| 1102 | zMime |
| 1103 | ); |
| 1104 | db_end_transaction(0); |
| 1105 | cgi_redirect("setup_logo"); |
| 1106 | }else if( P("clr")!=0 ){ |
| 1107 | db_multi_exec( |
| 1108 | "DELETE FROM config WHERE name GLOB 'logo-*'" |
| 1109 | ); |
| 1110 | db_end_transaction(0); |
| 1111 | cgi_redirect("setup_logo"); |
| 1112 | } |
| 1113 | style_header("Edit Project Logo"); |
| 1114 | @ <p>The current project logo has a MIME-Type of <b>%h(zMime)</b> and looks |
| 1115 | @ like this:</p> |
| 1116 | @ <blockquote><img src="%s(g.zTop)/logo" alt="logo"></blockquote> |
| @@ -1117,8 +1129,13 @@ | |
| 1129 | @ Logo Image file: |
| 1130 | @ <input type="file" name="im" size="60" accepts="image/*"><br> |
| 1131 | @ <input type="submit" name="set" value="Change Logo"> |
| 1132 | @ <input type="submit" name="clr" value="Revert To Default"> |
| 1133 | @ </form> |
| 1134 | @ |
| 1135 | @ <p><b>Note:</b> Your browser has probably cached the logo image, so |
| 1136 | @ you will probably need to press the Reload button on your browser after |
| 1137 | @ changing the logo to provoke your browser to reload the new logo image. |
| 1138 | @ </p> |
| 1139 | style_footer(); |
| 1140 | db_end_transaction(0); |
| 1141 | } |
| 1142 |
+1
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -391,10 +391,11 @@ | ||
| 391 | 391 | char *zCSS = 0; |
| 392 | 392 | |
| 393 | 393 | cgi_set_content_type("text/css"); |
| 394 | 394 | zCSS = db_get("css",(char*)zDefaultCSS); |
| 395 | 395 | cgi_append_content(zCSS, -1); |
| 396 | + g.isConst = 1; | |
| 396 | 397 | } |
| 397 | 398 | |
| 398 | 399 | /* |
| 399 | 400 | ** WEBPAGE: test_env |
| 400 | 401 | */ |
| 401 | 402 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -391,10 +391,11 @@ | |
| 391 | char *zCSS = 0; |
| 392 | |
| 393 | cgi_set_content_type("text/css"); |
| 394 | zCSS = db_get("css",(char*)zDefaultCSS); |
| 395 | cgi_append_content(zCSS, -1); |
| 396 | } |
| 397 | |
| 398 | /* |
| 399 | ** WEBPAGE: test_env |
| 400 | */ |
| 401 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -391,10 +391,11 @@ | |
| 391 | char *zCSS = 0; |
| 392 | |
| 393 | cgi_set_content_type("text/css"); |
| 394 | zCSS = db_get("css",(char*)zDefaultCSS); |
| 395 | cgi_append_content(zCSS, -1); |
| 396 | g.isConst = 1; |
| 397 | } |
| 398 | |
| 399 | /* |
| 400 | ** WEBPAGE: test_env |
| 401 | */ |
| 402 |
+5
-3
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -167,19 +167,21 @@ | ||
| 167 | 167 | zName = db_column_text(&q, 1); |
| 168 | 168 | rid = db_column_int(&q, 2); |
| 169 | 169 | isDeleted = db_column_int(&q, 3); |
| 170 | 170 | oldChnged = db_column_int(&q, 4); |
| 171 | 171 | oldMtime = db_column_int64(&q, 6); |
| 172 | - if( !file_isfile(zName) && file_size(0)>=0 ){ | |
| 172 | + if( isDeleted ){ | |
| 173 | + chnged = 1; | |
| 174 | + }else if( !file_isfile(zName) && file_size(0)>=0 ){ | |
| 173 | 175 | if( notFileIsFatal ){ |
| 174 | - fossil_warning("not a ordinary file: %s", zName); | |
| 176 | + fossil_warning("not an ordinary file: %s", zName); | |
| 175 | 177 | nErr++; |
| 176 | 178 | } |
| 177 | 179 | chnged = 1; |
| 178 | 180 | }else if( oldChnged>=2 ){ |
| 179 | 181 | chnged = oldChnged; |
| 180 | - }else if( isDeleted || rid==0 ){ | |
| 182 | + }else if( rid==0 ){ | |
| 181 | 183 | chnged = 1; |
| 182 | 184 | } |
| 183 | 185 | if( chnged!=1 ){ |
| 184 | 186 | currentMtime = file_mtime(0); |
| 185 | 187 | assert( currentMtime>0 ); |
| 186 | 188 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -167,19 +167,21 @@ | |
| 167 | zName = db_column_text(&q, 1); |
| 168 | rid = db_column_int(&q, 2); |
| 169 | isDeleted = db_column_int(&q, 3); |
| 170 | oldChnged = db_column_int(&q, 4); |
| 171 | oldMtime = db_column_int64(&q, 6); |
| 172 | if( !file_isfile(zName) && file_size(0)>=0 ){ |
| 173 | if( notFileIsFatal ){ |
| 174 | fossil_warning("not a ordinary file: %s", zName); |
| 175 | nErr++; |
| 176 | } |
| 177 | chnged = 1; |
| 178 | }else if( oldChnged>=2 ){ |
| 179 | chnged = oldChnged; |
| 180 | }else if( isDeleted || rid==0 ){ |
| 181 | chnged = 1; |
| 182 | } |
| 183 | if( chnged!=1 ){ |
| 184 | currentMtime = file_mtime(0); |
| 185 | assert( currentMtime>0 ); |
| 186 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -167,19 +167,21 @@ | |
| 167 | zName = db_column_text(&q, 1); |
| 168 | rid = db_column_int(&q, 2); |
| 169 | isDeleted = db_column_int(&q, 3); |
| 170 | oldChnged = db_column_int(&q, 4); |
| 171 | oldMtime = db_column_int64(&q, 6); |
| 172 | if( isDeleted ){ |
| 173 | chnged = 1; |
| 174 | }else if( !file_isfile(zName) && file_size(0)>=0 ){ |
| 175 | if( notFileIsFatal ){ |
| 176 | fossil_warning("not an ordinary file: %s", zName); |
| 177 | nErr++; |
| 178 | } |
| 179 | chnged = 1; |
| 180 | }else if( oldChnged>=2 ){ |
| 181 | chnged = oldChnged; |
| 182 | }else if( rid==0 ){ |
| 183 | chnged = 1; |
| 184 | } |
| 185 | if( chnged!=1 ){ |
| 186 | currentMtime = file_mtime(0); |
| 187 | assert( currentMtime>0 ); |
| 188 |
+3
-3
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -35,11 +35,11 @@ | ||
| 35 | 35 | ** Well-formed wiki page names do not begin or end with whitespace, |
| 36 | 36 | ** and do not contain tabs or other control characters and do not |
| 37 | 37 | ** contain more than a single space character in a row. Well-formed |
| 38 | 38 | ** names must be between 3 and 100 chracters in length, inclusive. |
| 39 | 39 | */ |
| 40 | -int wiki_name_is_wellformed(const char *z){ | |
| 40 | +int wiki_name_is_wellformed(const unsigned char *z){ | |
| 41 | 41 | int i; |
| 42 | 42 | if( z[0]<=0x20 ){ |
| 43 | 43 | return 0; |
| 44 | 44 | } |
| 45 | 45 | for(i=1; z[i]; i++){ |
| @@ -67,11 +67,11 @@ | ||
| 67 | 67 | /* |
| 68 | 68 | ** Check a wiki name. If it is not well-formed, then issue an error |
| 69 | 69 | ** and return true. If it is well-formed, return false. |
| 70 | 70 | */ |
| 71 | 71 | static int check_name(const char *z){ |
| 72 | - if( !wiki_name_is_wellformed(z) ){ | |
| 72 | + if( !wiki_name_is_wellformed((const unsigned char *)z) ){ | |
| 73 | 73 | style_header("Wiki Page Name Error"); |
| 74 | 74 | @ The wiki name "<b>%h(z)</b>" is not well-formed. Rules for |
| 75 | 75 | @ wiki page names: |
| 76 | 76 | well_formed_wiki_name_rules(); |
| 77 | 77 | style_footer(); |
| @@ -345,11 +345,11 @@ | ||
| 345 | 345 | if( !g.okNewWiki ){ |
| 346 | 346 | login_needed(); |
| 347 | 347 | return; |
| 348 | 348 | } |
| 349 | 349 | zName = PD("name",""); |
| 350 | - if( zName[0] && wiki_name_is_wellformed(zName) ){ | |
| 350 | + if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){ | |
| 351 | 351 | cgi_redirectf("wikiedit?name=%T", zName); |
| 352 | 352 | } |
| 353 | 353 | style_header("Create A New Wiki Page"); |
| 354 | 354 | @ <p>Rules for wiki page names: |
| 355 | 355 | well_formed_wiki_name_rules(); |
| 356 | 356 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -35,11 +35,11 @@ | |
| 35 | ** Well-formed wiki page names do not begin or end with whitespace, |
| 36 | ** and do not contain tabs or other control characters and do not |
| 37 | ** contain more than a single space character in a row. Well-formed |
| 38 | ** names must be between 3 and 100 chracters in length, inclusive. |
| 39 | */ |
| 40 | int wiki_name_is_wellformed(const char *z){ |
| 41 | int i; |
| 42 | if( z[0]<=0x20 ){ |
| 43 | return 0; |
| 44 | } |
| 45 | for(i=1; z[i]; i++){ |
| @@ -67,11 +67,11 @@ | |
| 67 | /* |
| 68 | ** Check a wiki name. If it is not well-formed, then issue an error |
| 69 | ** and return true. If it is well-formed, return false. |
| 70 | */ |
| 71 | static int check_name(const char *z){ |
| 72 | if( !wiki_name_is_wellformed(z) ){ |
| 73 | style_header("Wiki Page Name Error"); |
| 74 | @ The wiki name "<b>%h(z)</b>" is not well-formed. Rules for |
| 75 | @ wiki page names: |
| 76 | well_formed_wiki_name_rules(); |
| 77 | style_footer(); |
| @@ -345,11 +345,11 @@ | |
| 345 | if( !g.okNewWiki ){ |
| 346 | login_needed(); |
| 347 | return; |
| 348 | } |
| 349 | zName = PD("name",""); |
| 350 | if( zName[0] && wiki_name_is_wellformed(zName) ){ |
| 351 | cgi_redirectf("wikiedit?name=%T", zName); |
| 352 | } |
| 353 | style_header("Create A New Wiki Page"); |
| 354 | @ <p>Rules for wiki page names: |
| 355 | well_formed_wiki_name_rules(); |
| 356 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -35,11 +35,11 @@ | |
| 35 | ** Well-formed wiki page names do not begin or end with whitespace, |
| 36 | ** and do not contain tabs or other control characters and do not |
| 37 | ** contain more than a single space character in a row. Well-formed |
| 38 | ** names must be between 3 and 100 chracters in length, inclusive. |
| 39 | */ |
| 40 | int wiki_name_is_wellformed(const unsigned char *z){ |
| 41 | int i; |
| 42 | if( z[0]<=0x20 ){ |
| 43 | return 0; |
| 44 | } |
| 45 | for(i=1; z[i]; i++){ |
| @@ -67,11 +67,11 @@ | |
| 67 | /* |
| 68 | ** Check a wiki name. If it is not well-formed, then issue an error |
| 69 | ** and return true. If it is well-formed, return false. |
| 70 | */ |
| 71 | static int check_name(const char *z){ |
| 72 | if( !wiki_name_is_wellformed((const unsigned char *)z) ){ |
| 73 | style_header("Wiki Page Name Error"); |
| 74 | @ The wiki name "<b>%h(z)</b>" is not well-formed. Rules for |
| 75 | @ wiki page names: |
| 76 | well_formed_wiki_name_rules(); |
| 77 | style_footer(); |
| @@ -345,11 +345,11 @@ | |
| 345 | if( !g.okNewWiki ){ |
| 346 | login_needed(); |
| 347 | return; |
| 348 | } |
| 349 | zName = PD("name",""); |
| 350 | if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){ |
| 351 | cgi_redirectf("wikiedit?name=%T", zName); |
| 352 | } |
| 353 | style_header("Create A New Wiki Page"); |
| 354 | @ <p>Rules for wiki page names: |
| 355 | well_formed_wiki_name_rules(); |
| 356 |
+1
-1
| --- src/wikiformat.c | ||
| +++ src/wikiformat.c | ||
| @@ -1015,11 +1015,11 @@ | ||
| 1015 | 1015 | } |
| 1016 | 1016 | } |
| 1017 | 1017 | }else if( g.okHistory ){ |
| 1018 | 1018 | blob_appendf(p->pOut, "<a href=\"%s/info/%s\">", g.zBaseURL, zTarget); |
| 1019 | 1019 | } |
| 1020 | - }else if( wiki_name_is_wellformed(zTarget) ){ | |
| 1020 | + }else if( wiki_name_is_wellformed((const unsigned char *)zTarget) ){ | |
| 1021 | 1021 | blob_appendf(p->pOut, "<a href=\"%s/wiki?name=%T\">", g.zBaseURL, zTarget); |
| 1022 | 1022 | }else{ |
| 1023 | 1023 | blob_appendf(p->pOut, "[bad-link: %h]", zTarget); |
| 1024 | 1024 | zTerm = ""; |
| 1025 | 1025 | } |
| 1026 | 1026 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -1015,11 +1015,11 @@ | |
| 1015 | } |
| 1016 | } |
| 1017 | }else if( g.okHistory ){ |
| 1018 | blob_appendf(p->pOut, "<a href=\"%s/info/%s\">", g.zBaseURL, zTarget); |
| 1019 | } |
| 1020 | }else if( wiki_name_is_wellformed(zTarget) ){ |
| 1021 | blob_appendf(p->pOut, "<a href=\"%s/wiki?name=%T\">", g.zBaseURL, zTarget); |
| 1022 | }else{ |
| 1023 | blob_appendf(p->pOut, "[bad-link: %h]", zTarget); |
| 1024 | zTerm = ""; |
| 1025 | } |
| 1026 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -1015,11 +1015,11 @@ | |
| 1015 | } |
| 1016 | } |
| 1017 | }else if( g.okHistory ){ |
| 1018 | blob_appendf(p->pOut, "<a href=\"%s/info/%s\">", g.zBaseURL, zTarget); |
| 1019 | } |
| 1020 | }else if( wiki_name_is_wellformed((const unsigned char *)zTarget) ){ |
| 1021 | blob_appendf(p->pOut, "<a href=\"%s/wiki?name=%T\">", g.zBaseURL, zTarget); |
| 1022 | }else{ |
| 1023 | blob_appendf(p->pOut, "[bad-link: %h]", zTarget); |
| 1024 | zTerm = ""; |
| 1025 | } |
| 1026 |
+4
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -386,10 +386,13 @@ | ||
| 386 | 386 | Stmt q; |
| 387 | 387 | int rc = -1; |
| 388 | 388 | char *zLogin = blob_terminate(pLogin); |
| 389 | 389 | defossilize(zLogin); |
| 390 | 390 | |
| 391 | + if( strcmp(zLogin, "nobody")==0 || strcmp(zLogin,"anonymous")==0 ){ | |
| 392 | + return 0; /* Anybody is allowed to sync as "nobody" or "anonymous" */ | |
| 393 | + } | |
| 391 | 394 | db_prepare(&q, |
| 392 | 395 | "SELECT pw, cap, uid FROM user" |
| 393 | 396 | " WHERE login=%Q" |
| 394 | 397 | " AND login NOT IN ('anonymous','nobody','developer','reader')" |
| 395 | 398 | " AND length(pw)>0", |
| @@ -1062,11 +1065,11 @@ | ||
| 1062 | 1065 | nCardRcvd = 0; |
| 1063 | 1066 | xfer.nFileSent = 0; |
| 1064 | 1067 | xfer.nDeltaSent = 0; |
| 1065 | 1068 | xfer.nGimmeSent = 0; |
| 1066 | 1069 | fflush(stdout); |
| 1067 | - http_exchange(&send, &recv); | |
| 1070 | + http_exchange(&send, &recv, cloneFlag==0 || nCycle>0); | |
| 1068 | 1071 | blob_reset(&send); |
| 1069 | 1072 | |
| 1070 | 1073 | /* Begin constructing the next message (which might never be |
| 1071 | 1074 | ** sent) by beginning with the pull or push cards |
| 1072 | 1075 | */ |
| 1073 | 1076 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -386,10 +386,13 @@ | |
| 386 | Stmt q; |
| 387 | int rc = -1; |
| 388 | char *zLogin = blob_terminate(pLogin); |
| 389 | defossilize(zLogin); |
| 390 | |
| 391 | db_prepare(&q, |
| 392 | "SELECT pw, cap, uid FROM user" |
| 393 | " WHERE login=%Q" |
| 394 | " AND login NOT IN ('anonymous','nobody','developer','reader')" |
| 395 | " AND length(pw)>0", |
| @@ -1062,11 +1065,11 @@ | |
| 1062 | nCardRcvd = 0; |
| 1063 | xfer.nFileSent = 0; |
| 1064 | xfer.nDeltaSent = 0; |
| 1065 | xfer.nGimmeSent = 0; |
| 1066 | fflush(stdout); |
| 1067 | http_exchange(&send, &recv); |
| 1068 | blob_reset(&send); |
| 1069 | |
| 1070 | /* Begin constructing the next message (which might never be |
| 1071 | ** sent) by beginning with the pull or push cards |
| 1072 | */ |
| 1073 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -386,10 +386,13 @@ | |
| 386 | Stmt q; |
| 387 | int rc = -1; |
| 388 | char *zLogin = blob_terminate(pLogin); |
| 389 | defossilize(zLogin); |
| 390 | |
| 391 | if( strcmp(zLogin, "nobody")==0 || strcmp(zLogin,"anonymous")==0 ){ |
| 392 | return 0; /* Anybody is allowed to sync as "nobody" or "anonymous" */ |
| 393 | } |
| 394 | db_prepare(&q, |
| 395 | "SELECT pw, cap, uid FROM user" |
| 396 | " WHERE login=%Q" |
| 397 | " AND login NOT IN ('anonymous','nobody','developer','reader')" |
| 398 | " AND length(pw)>0", |
| @@ -1062,11 +1065,11 @@ | |
| 1065 | nCardRcvd = 0; |
| 1066 | xfer.nFileSent = 0; |
| 1067 | xfer.nDeltaSent = 0; |
| 1068 | xfer.nGimmeSent = 0; |
| 1069 | fflush(stdout); |
| 1070 | http_exchange(&send, &recv, cloneFlag==0 || nCycle>0); |
| 1071 | blob_reset(&send); |
| 1072 | |
| 1073 | /* Begin constructing the next message (which might never be |
| 1074 | ** sent) by beginning with the pull or push cards |
| 1075 | */ |
| 1076 |
+4
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -386,10 +386,13 @@ | ||
| 386 | 386 | Stmt q; |
| 387 | 387 | int rc = -1; |
| 388 | 388 | char *zLogin = blob_terminate(pLogin); |
| 389 | 389 | defossilize(zLogin); |
| 390 | 390 | |
| 391 | + if( strcmp(zLogin, "nobody")==0 || strcmp(zLogin,"anonymous")==0 ){ | |
| 392 | + return 0; /* Anybody is allowed to sync as "nobody" or "anonymous" */ | |
| 393 | + } | |
| 391 | 394 | db_prepare(&q, |
| 392 | 395 | "SELECT pw, cap, uid FROM user" |
| 393 | 396 | " WHERE login=%Q" |
| 394 | 397 | " AND login NOT IN ('anonymous','nobody','developer','reader')" |
| 395 | 398 | " AND length(pw)>0", |
| @@ -1062,11 +1065,11 @@ | ||
| 1062 | 1065 | nCardRcvd = 0; |
| 1063 | 1066 | xfer.nFileSent = 0; |
| 1064 | 1067 | xfer.nDeltaSent = 0; |
| 1065 | 1068 | xfer.nGimmeSent = 0; |
| 1066 | 1069 | fflush(stdout); |
| 1067 | - http_exchange(&send, &recv); | |
| 1070 | + http_exchange(&send, &recv, cloneFlag==0 || nCycle>0); | |
| 1068 | 1071 | blob_reset(&send); |
| 1069 | 1072 | |
| 1070 | 1073 | /* Begin constructing the next message (which might never be |
| 1071 | 1074 | ** sent) by beginning with the pull or push cards |
| 1072 | 1075 | */ |
| 1073 | 1076 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -386,10 +386,13 @@ | |
| 386 | Stmt q; |
| 387 | int rc = -1; |
| 388 | char *zLogin = blob_terminate(pLogin); |
| 389 | defossilize(zLogin); |
| 390 | |
| 391 | db_prepare(&q, |
| 392 | "SELECT pw, cap, uid FROM user" |
| 393 | " WHERE login=%Q" |
| 394 | " AND login NOT IN ('anonymous','nobody','developer','reader')" |
| 395 | " AND length(pw)>0", |
| @@ -1062,11 +1065,11 @@ | |
| 1062 | nCardRcvd = 0; |
| 1063 | xfer.nFileSent = 0; |
| 1064 | xfer.nDeltaSent = 0; |
| 1065 | xfer.nGimmeSent = 0; |
| 1066 | fflush(stdout); |
| 1067 | http_exchange(&send, &recv); |
| 1068 | blob_reset(&send); |
| 1069 | |
| 1070 | /* Begin constructing the next message (which might never be |
| 1071 | ** sent) by beginning with the pull or push cards |
| 1072 | */ |
| 1073 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -386,10 +386,13 @@ | |
| 386 | Stmt q; |
| 387 | int rc = -1; |
| 388 | char *zLogin = blob_terminate(pLogin); |
| 389 | defossilize(zLogin); |
| 390 | |
| 391 | if( strcmp(zLogin, "nobody")==0 || strcmp(zLogin,"anonymous")==0 ){ |
| 392 | return 0; /* Anybody is allowed to sync as "nobody" or "anonymous" */ |
| 393 | } |
| 394 | db_prepare(&q, |
| 395 | "SELECT pw, cap, uid FROM user" |
| 396 | " WHERE login=%Q" |
| 397 | " AND login NOT IN ('anonymous','nobody','developer','reader')" |
| 398 | " AND length(pw)>0", |
| @@ -1062,11 +1065,11 @@ | |
| 1065 | nCardRcvd = 0; |
| 1066 | xfer.nFileSent = 0; |
| 1067 | xfer.nDeltaSent = 0; |
| 1068 | xfer.nGimmeSent = 0; |
| 1069 | fflush(stdout); |
| 1070 | http_exchange(&send, &recv, cloneFlag==0 || nCycle>0); |
| 1071 | blob_reset(&send); |
| 1072 | |
| 1073 | /* Begin constructing the next message (which might never be |
| 1074 | ** sent) by beginning with the pull or push cards |
| 1075 | */ |
| 1076 |
+1
-1
| --- www/branching.wiki | ||
| +++ www/branching.wiki | ||
| @@ -173,11 +173,11 @@ | ||
| 173 | 173 | <i>property</i> is a name/value pair. Internally, fossil implements |
| 174 | 174 | tags as properties with a NULL value. So, tags and properties really |
| 175 | 175 | are much the same thing, and henceforth we will use the word "tag" |
| 176 | 176 | to mean either a tag or a property. |
| 177 | 177 | |
| 178 | -A tag can be either a one-time tag or an propagating tag or a cancellation tag. | |
| 178 | +A tag can be a one-time tag, a propagating tag or a cancellation tag. | |
| 179 | 179 | A one-time tag only applies to the check-in to which it is attached. A |
| 180 | 180 | propagating tag applies to the check-in to which it is attached and also |
| 181 | 181 | to all direct descendants of that check-in. A <i>direct descendant</i> |
| 182 | 182 | is a descendant through direct children. Tags propagation does not |
| 183 | 183 | cross merges. Tag propagation also stops as soon |
| 184 | 184 |
| --- www/branching.wiki | |
| +++ www/branching.wiki | |
| @@ -173,11 +173,11 @@ | |
| 173 | <i>property</i> is a name/value pair. Internally, fossil implements |
| 174 | tags as properties with a NULL value. So, tags and properties really |
| 175 | are much the same thing, and henceforth we will use the word "tag" |
| 176 | to mean either a tag or a property. |
| 177 | |
| 178 | A tag can be either a one-time tag or an propagating tag or a cancellation tag. |
| 179 | A one-time tag only applies to the check-in to which it is attached. A |
| 180 | propagating tag applies to the check-in to which it is attached and also |
| 181 | to all direct descendants of that check-in. A <i>direct descendant</i> |
| 182 | is a descendant through direct children. Tags propagation does not |
| 183 | cross merges. Tag propagation also stops as soon |
| 184 |
| --- www/branching.wiki | |
| +++ www/branching.wiki | |
| @@ -173,11 +173,11 @@ | |
| 173 | <i>property</i> is a name/value pair. Internally, fossil implements |
| 174 | tags as properties with a NULL value. So, tags and properties really |
| 175 | are much the same thing, and henceforth we will use the word "tag" |
| 176 | to mean either a tag or a property. |
| 177 | |
| 178 | A tag can be a one-time tag, a propagating tag or a cancellation tag. |
| 179 | A one-time tag only applies to the check-in to which it is attached. A |
| 180 | propagating tag applies to the check-in to which it is attached and also |
| 181 | to all direct descendants of that check-in. A <i>direct descendant</i> |
| 182 | is a descendant through direct children. Tags propagation does not |
| 183 | cross merges. Tag propagation also stops as soon |
| 184 |