Fossil SCM
Added quotes around the URLs passed to the browser for the ui command so that URL parameters containing an ampersand get passed on correctly.
Commit
126d34fb321c79871b00309917ec623321789bcaaca25d4aae431c3e298074d1
Parent
bfe7750e94ca302…
1 file changed
+3
-3
+3
-3
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2812,17 +2812,17 @@ | ||
| 2812 | 2812 | } |
| 2813 | 2813 | #else |
| 2814 | 2814 | zBrowser = db_get("web-browser", "open"); |
| 2815 | 2815 | #endif |
| 2816 | 2816 | if( zIpAddr==0 ){ |
| 2817 | - zBrowserCmd = mprintf("%s http://localhost:%%d/%s &", | |
| 2817 | + zBrowserCmd = mprintf("%s \"http://localhost:%%d/%s\" &", | |
| 2818 | 2818 | zBrowser, zInitPage); |
| 2819 | 2819 | }else if( strchr(zIpAddr,':') ){ |
| 2820 | - zBrowserCmd = mprintf("%s http://[%s]:%%d/%s &", | |
| 2820 | + zBrowserCmd = mprintf("%s \"http://[%s]:%%d/%s\" &", | |
| 2821 | 2821 | zBrowser, zIpAddr, zInitPage); |
| 2822 | 2822 | }else{ |
| 2823 | - zBrowserCmd = mprintf("%s http://%s:%%d/%s &", | |
| 2823 | + zBrowserCmd = mprintf("%s \"http://%s:%%d/%s\" &", | |
| 2824 | 2824 | zBrowser, zIpAddr, zInitPage); |
| 2825 | 2825 | } |
| 2826 | 2826 | } |
| 2827 | 2827 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 2828 | 2828 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 2829 | 2829 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2812,17 +2812,17 @@ | |
| 2812 | } |
| 2813 | #else |
| 2814 | zBrowser = db_get("web-browser", "open"); |
| 2815 | #endif |
| 2816 | if( zIpAddr==0 ){ |
| 2817 | zBrowserCmd = mprintf("%s http://localhost:%%d/%s &", |
| 2818 | zBrowser, zInitPage); |
| 2819 | }else if( strchr(zIpAddr,':') ){ |
| 2820 | zBrowserCmd = mprintf("%s http://[%s]:%%d/%s &", |
| 2821 | zBrowser, zIpAddr, zInitPage); |
| 2822 | }else{ |
| 2823 | zBrowserCmd = mprintf("%s http://%s:%%d/%s &", |
| 2824 | zBrowser, zIpAddr, zInitPage); |
| 2825 | } |
| 2826 | } |
| 2827 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 2828 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 2829 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2812,17 +2812,17 @@ | |
| 2812 | } |
| 2813 | #else |
| 2814 | zBrowser = db_get("web-browser", "open"); |
| 2815 | #endif |
| 2816 | if( zIpAddr==0 ){ |
| 2817 | zBrowserCmd = mprintf("%s \"http://localhost:%%d/%s\" &", |
| 2818 | zBrowser, zInitPage); |
| 2819 | }else if( strchr(zIpAddr,':') ){ |
| 2820 | zBrowserCmd = mprintf("%s \"http://[%s]:%%d/%s\" &", |
| 2821 | zBrowser, zIpAddr, zInitPage); |
| 2822 | }else{ |
| 2823 | zBrowserCmd = mprintf("%s \"http://%s:%%d/%s\" &", |
| 2824 | zBrowser, zIpAddr, zInitPage); |
| 2825 | } |
| 2826 | } |
| 2827 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 2828 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 2829 |