Fossil SCM
Revise the character escaping logic for generated tarballs and zip archives. Add a "For best results" comment to the configuration page where the project name is set.
Commit
fe76ad5567cfba10b156dd2d11a637aa69ac6a86
Parent
cee30a34d80d3fe…
2 files changed
+5
-1
+4
-1
+5
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -579,11 +579,15 @@ | ||
| 579 | 579 | @ <td>%h(zUser) @ %h(zIpAddr) on %s(zDate)</td></tr> |
| 580 | 580 | } |
| 581 | 581 | db_finalize(&q2); |
| 582 | 582 | } |
| 583 | 583 | if( g.perm.Hyperlink ){ |
| 584 | - char *zProjName = mprintf("%t", db_get("project-name", "unnamed")); | |
| 584 | + char *zProjName = mprintf("%s", db_get("project-name", "unnamed")); | |
| 585 | + int jj; | |
| 586 | + for(jj=0; zProjName[jj]; jj++){ | |
| 587 | + if( strchr("\\/:*?[]", zProjName[jj]) ) zProjName[jj] = '_'; | |
| 588 | + } | |
| 585 | 589 | @ <tr><th>Timelines:</th><td> |
| 586 | 590 | @ %z(href("%R/timeline?f=%S",zUuid))family</a> |
| 587 | 591 | if( zParent ){ |
| 588 | 592 | @ | %z(href("%R/timeline?p=%S",zUuid))ancestors</a> |
| 589 | 593 | } |
| 590 | 594 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -579,11 +579,15 @@ | |
| 579 | @ <td>%h(zUser) @ %h(zIpAddr) on %s(zDate)</td></tr> |
| 580 | } |
| 581 | db_finalize(&q2); |
| 582 | } |
| 583 | if( g.perm.Hyperlink ){ |
| 584 | char *zProjName = mprintf("%t", db_get("project-name", "unnamed")); |
| 585 | @ <tr><th>Timelines:</th><td> |
| 586 | @ %z(href("%R/timeline?f=%S",zUuid))family</a> |
| 587 | if( zParent ){ |
| 588 | @ | %z(href("%R/timeline?p=%S",zUuid))ancestors</a> |
| 589 | } |
| 590 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -579,11 +579,15 @@ | |
| 579 | @ <td>%h(zUser) @ %h(zIpAddr) on %s(zDate)</td></tr> |
| 580 | } |
| 581 | db_finalize(&q2); |
| 582 | } |
| 583 | if( g.perm.Hyperlink ){ |
| 584 | char *zProjName = mprintf("%s", db_get("project-name", "unnamed")); |
| 585 | int jj; |
| 586 | for(jj=0; zProjName[jj]; jj++){ |
| 587 | if( strchr("\\/:*?[]", zProjName[jj]) ) zProjName[jj] = '_'; |
| 588 | } |
| 589 | @ <tr><th>Timelines:</th><td> |
| 590 | @ %z(href("%R/timeline?f=%S",zUuid))family</a> |
| 591 | if( zParent ){ |
| 592 | @ | %z(href("%R/timeline?p=%S",zUuid))ancestors</a> |
| 593 | } |
| 594 |
+4
-1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1273,11 +1273,14 @@ | ||
| 1273 | 1273 | @ <form action="%s(g.zTop)/setup_config" method="post"><div> |
| 1274 | 1274 | login_insert_csrf_secret(); |
| 1275 | 1275 | @ <hr /> |
| 1276 | 1276 | entry_attribute("Project Name", 60, "project-name", "pn", "", 0); |
| 1277 | 1277 | @ <p>Give your project a name so visitors know what this site is about. |
| 1278 | - @ The project name will also be used as the RSS feed title.</p> | |
| 1278 | + @ The project name will also be used as the RSS feed title and as the default | |
| 1279 | + @ directory name for generated tarballs and ZIP archives. For best results: | |
| 1280 | + @ <ul><li>Keep the name short<li>Avoid special characters (ex: "/" and "\")</ul> | |
| 1281 | + @ </p> | |
| 1279 | 1282 | @ <hr /> |
| 1280 | 1283 | textarea_attribute("Project Description", 3, 80, |
| 1281 | 1284 | "project-description", "pd", "", 0); |
| 1282 | 1285 | @ <p>Describe your project. This will be used in page headers for search |
| 1283 | 1286 | @ engines as well as a short RSS description.</p> |
| 1284 | 1287 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1273,11 +1273,14 @@ | |
| 1273 | @ <form action="%s(g.zTop)/setup_config" method="post"><div> |
| 1274 | login_insert_csrf_secret(); |
| 1275 | @ <hr /> |
| 1276 | entry_attribute("Project Name", 60, "project-name", "pn", "", 0); |
| 1277 | @ <p>Give your project a name so visitors know what this site is about. |
| 1278 | @ The project name will also be used as the RSS feed title.</p> |
| 1279 | @ <hr /> |
| 1280 | textarea_attribute("Project Description", 3, 80, |
| 1281 | "project-description", "pd", "", 0); |
| 1282 | @ <p>Describe your project. This will be used in page headers for search |
| 1283 | @ engines as well as a short RSS description.</p> |
| 1284 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1273,11 +1273,14 @@ | |
| 1273 | @ <form action="%s(g.zTop)/setup_config" method="post"><div> |
| 1274 | login_insert_csrf_secret(); |
| 1275 | @ <hr /> |
| 1276 | entry_attribute("Project Name", 60, "project-name", "pn", "", 0); |
| 1277 | @ <p>Give your project a name so visitors know what this site is about. |
| 1278 | @ The project name will also be used as the RSS feed title and as the default |
| 1279 | @ directory name for generated tarballs and ZIP archives. For best results: |
| 1280 | @ <ul><li>Keep the name short<li>Avoid special characters (ex: "/" and "\")</ul> |
| 1281 | @ </p> |
| 1282 | @ <hr /> |
| 1283 | textarea_attribute("Project Description", 3, 80, |
| 1284 | "project-description", "pd", "", 0); |
| 1285 | @ <p>Describe your project. This will be used in page headers for search |
| 1286 | @ engines as well as a short RSS description.</p> |
| 1287 |