Fossil SCM
In the "fossil chat send" command, detect extra arguments and throw an error if they are seen.
Commit
1814f528de4987ed807f885abc3b9f08f1e1d999dc4122cc00764719f6e4c4f8
Parent
6da3a74d5fa83b9…
1 file changed
+3
+3
| --- src/chat.c | ||
| +++ src/chat.c | ||
| @@ -767,10 +767,13 @@ | ||
| 767 | 767 | } |
| 768 | 768 | if( !g.url.isHttps && !allowUnsafe ){ |
| 769 | 769 | fossil_fatal("URL \"%s\" is unencrypted. Use https:// instead", zUrl); |
| 770 | 770 | } |
| 771 | 771 | verify_all_options(); |
| 772 | + if( g.argc>3 ){ | |
| 773 | + fossil_fatal("unknown extra argument: \"%s\"", g.argv[3]); | |
| 774 | + } | |
| 772 | 775 | i = (int)strlen(g.url.path); |
| 773 | 776 | while( i>0 && g.url.path[i-1]=='/' ) i--; |
| 774 | 777 | g.url.path = mprintf("%.*s/chat-send", i, g.url.path); |
| 775 | 778 | blob_init(&up, 0, 0); |
| 776 | 779 | blob_init(&down, 0, 0); |
| 777 | 780 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -767,10 +767,13 @@ | |
| 767 | } |
| 768 | if( !g.url.isHttps && !allowUnsafe ){ |
| 769 | fossil_fatal("URL \"%s\" is unencrypted. Use https:// instead", zUrl); |
| 770 | } |
| 771 | verify_all_options(); |
| 772 | i = (int)strlen(g.url.path); |
| 773 | while( i>0 && g.url.path[i-1]=='/' ) i--; |
| 774 | g.url.path = mprintf("%.*s/chat-send", i, g.url.path); |
| 775 | blob_init(&up, 0, 0); |
| 776 | blob_init(&down, 0, 0); |
| 777 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -767,10 +767,13 @@ | |
| 767 | } |
| 768 | if( !g.url.isHttps && !allowUnsafe ){ |
| 769 | fossil_fatal("URL \"%s\" is unencrypted. Use https:// instead", zUrl); |
| 770 | } |
| 771 | verify_all_options(); |
| 772 | if( g.argc>3 ){ |
| 773 | fossil_fatal("unknown extra argument: \"%s\"", g.argv[3]); |
| 774 | } |
| 775 | i = (int)strlen(g.url.path); |
| 776 | while( i>0 && g.url.path[i-1]=='/' ) i--; |
| 777 | g.url.path = mprintf("%.*s/chat-send", i, g.url.path); |
| 778 | blob_init(&up, 0, 0); |
| 779 | blob_init(&down, 0, 0); |
| 780 |