Fossil SCM

Also allow the '-' character in parameter and cookie names. This is necessary for the login cookie.

drh 2018-03-29 17:03 trunk
Commit 21780aef9a48339c4db33634885cacab14721036fd3ba3a0f237dc5d2a521d14
1 file changed +1 -1
+1 -1
--- src/blob.c
+++ src/blob.c
@@ -119,11 +119,11 @@
119119
120120
/* Return true if and only if the entire string consists of only
121121
** alphanumeric characters.
122122
*/
123123
int fossil_no_strange_characters(const char *z){
124
- while( z && (fossil_isalnum(z[0]) || z[0]=='_') ) z++;
124
+ while( z && (fossil_isalnum(z[0]) || z[0]=='_' || z[0]=='-') ) z++;
125125
return z[0]==0;
126126
}
127127
128128
129129
/*
130130
--- src/blob.c
+++ src/blob.c
@@ -119,11 +119,11 @@
119
120 /* Return true if and only if the entire string consists of only
121 ** alphanumeric characters.
122 */
123 int fossil_no_strange_characters(const char *z){
124 while( z && (fossil_isalnum(z[0]) || z[0]=='_') ) z++;
125 return z[0]==0;
126 }
127
128
129 /*
130
--- src/blob.c
+++ src/blob.c
@@ -119,11 +119,11 @@
119
120 /* Return true if and only if the entire string consists of only
121 ** alphanumeric characters.
122 */
123 int fossil_no_strange_characters(const char *z){
124 while( z && (fossil_isalnum(z[0]) || z[0]=='_' || z[0]=='-') ) z++;
125 return z[0]==0;
126 }
127
128
129 /*
130

Keyboard Shortcuts

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