(url_parse0): Allow for <user>:<password>;AUTH=<auth> syntax.
Showing
2 changed files
with
12 additions
and
8 deletions
... | @@ -260,12 +260,17 @@ url_parse0 (mu_url_t u, char *name) | ... | @@ -260,12 +260,17 @@ url_parse0 (mu_url_t u, char *name) |
260 | /* Try to split the user into a: | 260 | /* Try to split the user into a: |
261 | <user>:<password> | 261 | <user>:<password> |
262 | or | 262 | or |
263 | <user>;AUTH=<auth> | 263 | <user>:<password>;AUTH=<auth> |
264 | */ | 264 | */ |
265 | 265 | ||
266 | for (; *name; name++) | 266 | for (; *name; name++) |
267 | { | 267 | { |
268 | if (*name == ';') | 268 | if (*name == ':') |
269 | { | ||
270 | *name++ = 0; | ||
271 | u->passwd = name; | ||
272 | } | ||
273 | else if (*name == ';') | ||
269 | { | 274 | { |
270 | /* Make sure it's the auth token. */ | 275 | /* Make sure it's the auth token. */ |
271 | if (strncasecmp (name + 1, "auth=", 5) == 0) | 276 | if (strncasecmp (name + 1, "auth=", 5) == 0) |
... | @@ -276,12 +281,6 @@ url_parse0 (mu_url_t u, char *name) | ... | @@ -276,12 +281,6 @@ url_parse0 (mu_url_t u, char *name) |
276 | break; | 281 | break; |
277 | } | 282 | } |
278 | } | 283 | } |
279 | if (*name == ':') | ||
280 | { | ||
281 | *name++ = 0; | ||
282 | u->passwd = name; | ||
283 | break; | ||
284 | } | ||
285 | } | 284 | } |
286 | } | 285 | } |
287 | 286 | ... | ... |
-
Please register or sign in to post a comment