Fossil SCM

Disallow the ';' character in blob_append_escape_arg().

drh 2017-08-12 18:30 trunk
Commit 3bbac575348d0a54cf8882d41eba701fe7bfb90ef0bd7f082c1d7405f9db6f80
1 file changed +1 -1
+1 -1
--- src/blob.c
+++ src/blob.c
@@ -1195,11 +1195,11 @@
11951195
#else
11961196
const char cQuote = '\''; /* Use '...' quoting on unix */
11971197
#endif
11981198
11991199
for(i=0; (c = zIn[i])!=0; i++){
1200
- if( c==cQuote || c=='\\' || c<' ' ) {
1200
+ if( c==cQuote || c=='\\' || c<' ' || c==';' ) {
12011201
Blob bad;
12021202
blob_token(pBlob, &bad);
12031203
fossil_fatal("the [%s] argument to the \"%s\" command contains "
12041204
"a character (ascii 0x%02x) that is a security risk",
12051205
zIn, blob_str(&bad), c);
12061206
--- src/blob.c
+++ src/blob.c
@@ -1195,11 +1195,11 @@
1195 #else
1196 const char cQuote = '\''; /* Use '...' quoting on unix */
1197 #endif
1198
1199 for(i=0; (c = zIn[i])!=0; i++){
1200 if( c==cQuote || c=='\\' || c<' ' ) {
1201 Blob bad;
1202 blob_token(pBlob, &bad);
1203 fossil_fatal("the [%s] argument to the \"%s\" command contains "
1204 "a character (ascii 0x%02x) that is a security risk",
1205 zIn, blob_str(&bad), c);
1206
--- src/blob.c
+++ src/blob.c
@@ -1195,11 +1195,11 @@
1195 #else
1196 const char cQuote = '\''; /* Use '...' quoting on unix */
1197 #endif
1198
1199 for(i=0; (c = zIn[i])!=0; i++){
1200 if( c==cQuote || c=='\\' || c<' ' || c==';' ) {
1201 Blob bad;
1202 blob_token(pBlob, &bad);
1203 fossil_fatal("the [%s] argument to the \"%s\" command contains "
1204 "a character (ascii 0x%02x) that is a security risk",
1205 zIn, blob_str(&bad), c);
1206

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button