]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When MD5 authentication is not possible because there is no challenge present,
authorRussell Bryant <russell@russellbryant.com>
Fri, 11 May 2007 16:05:43 +0000 (16:05 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 11 May 2007 16:05:43 +0000 (16:05 +0000)
either because the Challenge action was never issued, or some other reason,
give a proper error message and return an error instead of claiming that the
user wasn't found.
(reported by jsmith on IRC)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@63886 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index 383411fbe553e9855c072146c8279eeb98a79bbd..b7c37c925854207b2125dc5faaf91335c53eb824 100644 (file)
@@ -946,6 +946,11 @@ static int authenticate(struct mansession *s, const struct message *m)
                                                        ast_config_destroy(cfg);
                                                        return -1;
                                                }
+                                       } else {
+                                               ast_log(LOG_DEBUG, "MD5 authentication is not possible.  challenge: '%s'\n", 
+                                                       S_OR(s->challenge, ""));
+                                               ast_config_destroy(cfg);
+                                               return -1;
                                        }
                                } else if (password && !strcmp(password, pass)) {
                                        break;