Fossil SCM
Add /zip and /tarball pages to the robot-squelch mechanism.
Commit
661991aa62ad2dda327ec03ad9c5622af6bded754eb8b30ebe6605acff833b6b
Parent
de66eeaab7ab664…
2 files changed
+1
+1
+1
| --- src/tar.c | ||
| +++ src/tar.c | ||
| @@ -760,10 +760,11 @@ | ||
| 760 | 760 | Blob tarball; /* Tarball accumulated here */ |
| 761 | 761 | const char *z; |
| 762 | 762 | |
| 763 | 763 | login_check_credentials(); |
| 764 | 764 | if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; } |
| 765 | + if( robot_squelch(900) ) return; | |
| 765 | 766 | fossil_nice_default(); |
| 766 | 767 | zName = fossil_strdup(PD("name","")); |
| 767 | 768 | z = P("r"); |
| 768 | 769 | if( z==0 ) z = P("uuid"); |
| 769 | 770 | if( z==0 ) z = tar_uuid_from_name(&zName); |
| 770 | 771 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -760,10 +760,11 @@ | |
| 760 | Blob tarball; /* Tarball accumulated here */ |
| 761 | const char *z; |
| 762 | |
| 763 | login_check_credentials(); |
| 764 | if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; } |
| 765 | fossil_nice_default(); |
| 766 | zName = fossil_strdup(PD("name","")); |
| 767 | z = P("r"); |
| 768 | if( z==0 ) z = P("uuid"); |
| 769 | if( z==0 ) z = tar_uuid_from_name(&zName); |
| 770 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -760,10 +760,11 @@ | |
| 760 | Blob tarball; /* Tarball accumulated here */ |
| 761 | const char *z; |
| 762 | |
| 763 | login_check_credentials(); |
| 764 | if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; } |
| 765 | if( robot_squelch(900) ) return; |
| 766 | fossil_nice_default(); |
| 767 | zName = fossil_strdup(PD("name","")); |
| 768 | z = P("r"); |
| 769 | if( z==0 ) z = P("uuid"); |
| 770 | if( z==0 ) z = tar_uuid_from_name(&zName); |
| 771 |
+1
| --- src/zip.c | ||
| +++ src/zip.c | ||
| @@ -1012,10 +1012,11 @@ | ||
| 1012 | 1012 | int eType = ARCHIVE_ZIP; /* Type of archive to generate */ |
| 1013 | 1013 | char *zType; /* Human-readable archive type */ |
| 1014 | 1014 | |
| 1015 | 1015 | login_check_credentials(); |
| 1016 | 1016 | if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; } |
| 1017 | + if( robot_squelch(900) ) return; | |
| 1017 | 1018 | if( fossil_strcmp(g.zPath, "sqlar")==0 ){ |
| 1018 | 1019 | eType = ARCHIVE_SQLAR; |
| 1019 | 1020 | zType = "SQL"; |
| 1020 | 1021 | /* For some reason, SQL-archives are like catnip for robots. So |
| 1021 | 1022 | ** don't allow them to be downloaded by user "nobody" */ |
| 1022 | 1023 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -1012,10 +1012,11 @@ | |
| 1012 | int eType = ARCHIVE_ZIP; /* Type of archive to generate */ |
| 1013 | char *zType; /* Human-readable archive type */ |
| 1014 | |
| 1015 | login_check_credentials(); |
| 1016 | if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; } |
| 1017 | if( fossil_strcmp(g.zPath, "sqlar")==0 ){ |
| 1018 | eType = ARCHIVE_SQLAR; |
| 1019 | zType = "SQL"; |
| 1020 | /* For some reason, SQL-archives are like catnip for robots. So |
| 1021 | ** don't allow them to be downloaded by user "nobody" */ |
| 1022 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -1012,10 +1012,11 @@ | |
| 1012 | int eType = ARCHIVE_ZIP; /* Type of archive to generate */ |
| 1013 | char *zType; /* Human-readable archive type */ |
| 1014 | |
| 1015 | login_check_credentials(); |
| 1016 | if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; } |
| 1017 | if( robot_squelch(900) ) return; |
| 1018 | if( fossil_strcmp(g.zPath, "sqlar")==0 ){ |
| 1019 | eType = ARCHIVE_SQLAR; |
| 1020 | zType = "SQL"; |
| 1021 | /* For some reason, SQL-archives are like catnip for robots. So |
| 1022 | ** don't allow them to be downloaded by user "nobody" */ |
| 1023 |