| | @@ -1548,11 +1548,13 @@ |
| 1548 | 1548 | |
| 1549 | 1549 | if( szFile<1024 ){ |
| 1550 | 1550 | set_base_url(0); |
| 1551 | 1551 | if( zNotFound ){ |
| 1552 | 1552 | cgi_redirect(zNotFound); |
| 1553 | | - }else if( strcmp(zPathInfo,"/")==0 && repo_list_page() ){ |
| 1553 | + }else if( strcmp(zPathInfo,"/")==0 |
| 1554 | + && allowRepoList |
| 1555 | + && repo_list_page() ){ |
| 1554 | 1556 | /* Will return a list of repositories */ |
| 1555 | 1557 | }else{ |
| 1556 | 1558 | #ifdef FOSSIL_ENABLE_JSON |
| 1557 | 1559 | if(g.json.isJsonMode){ |
| 1558 | 1560 | json_err(FSL_JSON_E_RESOURCE_NOT_FOUND,NULL,1); |
| | @@ -2264,13 +2266,12 @@ |
| 2264 | 2266 | ** |
| 2265 | 2267 | ** By default, the "ui" command provides full administrative access without |
| 2266 | 2268 | ** having to log in. This can be disabled by turning off the "localauth" |
| 2267 | 2269 | ** setting. Automatic login for the "server" command is available if the |
| 2268 | 2270 | ** --localauth option is present and the "localauth" setting is off and the |
| 2269 | | -** connection is from localhost. The optional REPOSITORY argument to "ui" |
| 2270 | | -** may be a directory and will function as "server" if and only if the |
| 2271 | | -** --notfound option is used. |
| 2271 | +** connection is from localhost. The "ui" command also enables --repolist |
| 2272 | +** by default. |
| 2272 | 2273 | ** |
| 2273 | 2274 | ** Options: |
| 2274 | 2275 | ** --baseurl URL Use URL as the base (useful for reverse proxies) |
| 2275 | 2276 | ** --files GLOBLIST Comma-separated list of glob patterns for static files |
| 2276 | 2277 | ** --localauth enable automatic login for requests from localhost |
| | @@ -2337,11 +2338,11 @@ |
| 2337 | 2338 | verify_all_options(); |
| 2338 | 2339 | |
| 2339 | 2340 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2340 | 2341 | isUiCmd = g.argv[1][0]=='u'; |
| 2341 | 2342 | if( isUiCmd ){ |
| 2342 | | - flags |= HTTP_SERVER_LOCALHOST; |
| 2343 | + flags |= HTTP_SERVER_LOCALHOST|HTTP_SERVER_REPOLIST; |
| 2343 | 2344 | g.useLocalauth = 1; |
| 2344 | 2345 | allowRepoList = 1; |
| 2345 | 2346 | } |
| 2346 | 2347 | find_server_repository(2); |
| 2347 | 2348 | if( zPort ){ |
| 2348 | 2349 | |