projects
/
cyrus-sasl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a3d1339
)
more tolerant mechlist parsing
author
Luke Howard
<lukeh@padl.com>
Mon, 27 Sep 2010 12:36:26 +0000
(14:36 +0200)
committer
Luke Howard
<lukeh@padl.com>
Mon, 27 Sep 2010 12:36:26 +0000
(14:36 +0200)
lib/client.c
patch
|
blob
|
history
diff --git
a/lib/client.c
b/lib/client.c
index
310977c
..
854d9ab
100644
(file)
--- a/
lib/client.c
+++ b/
lib/client.c
@@
-419,9
+419,18
@@
_sasl_client_order_mechs(const sasl_utils_t *utils,
if (list == NULL)
return SASL_NOMEM;
if (list == NULL)
return SASL_NOMEM;
+ /* xxx confirm this with rfc 2222
+ * SASL mechanism allowable characters are "AZaz-_"
+ * seperators can be any other characters and of any length
+ * even variable lengths between
+ *
+ * Apps should be encouraged to simply use space or comma space
+ * though
+ */
+#define ismechchar(c) (isalnum((c)) || (c) == '_' || (c) == '-')
do {
for (start = p = mechs, i = 0; *p != '\0'; p++) {
do {
for (start = p = mechs, i = 0; *p != '\0'; p++) {
- if (
isspace
(*p) || p[1] == '\0') {
+ if (
!ismechchar
(*p) || p[1] == '\0') {
size_t len = p - start;
if (p[1] == '\0')
size_t len = p - start;
if (p[1] == '\0')
@@
-465,14
+474,6
@@
_sasl_client_order_mechs(const sasl_utils_t *utils,
* SASL_INTERACT -- user interaction needed to fill in prompt_need list
*/
* SASL_INTERACT -- user interaction needed to fill in prompt_need list
*/
-/* xxx confirm this with rfc 2222
- * SASL mechanism allowable characters are "AZaz-_"
- * seperators can be any other characters and of any length
- * even variable lengths between
- *
- * Apps should be encouraged to simply use space or comma space
- * though
- */
int sasl_client_start(sasl_conn_t *conn,
const char *mechlist,
sasl_interact_t **prompt_need,
int sasl_client_start(sasl_conn_t *conn,
const char *mechlist,
sasl_interact_t **prompt_need,