mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Merged revisions 316917-316919 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r316917 | seanbright | 2011-05-04 22:23:28 -0400 (Wed, 04 May 2011) | 5 lines Make sure that tcptls_session is properly initialized. (issue #18598) Reported by: ksn ........ r316918 | seanbright | 2011-05-04 22:25:20 -0400 (Wed, 04 May 2011) | 5 lines Look at the correct buffer for our digest info instead of an empty one. (issue #18598) Reported by: ksn ........ r316919 | seanbright | 2011-05-04 22:30:45 -0400 (Wed, 04 May 2011) | 10 lines Use the correct HTTP method when generating our digest, otherwise we always fail. When calculating the 'A2' portion of our digest for verification, we need the HTTP method that is currently in use. Unfortunately our mapping function was incorrect, resulting in invalid hashes being generated and, in turn, failures in authentication. (closes issue #18598) Reported by: ksn ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1995,7 +1995,7 @@ int ast_utils_init(void)
|
||||
*/
|
||||
int ast_parse_digest(const char *digest, struct ast_http_digest *d, int request, int pedantic) {
|
||||
int i;
|
||||
char *c, key[512], val[512], tmp[512];
|
||||
char *c, key[512], val[512];
|
||||
struct ast_str *str = ast_str_create(16);
|
||||
|
||||
if (ast_strlen_zero(digest) || !d || !str) {
|
||||
@@ -2007,7 +2007,7 @@ int ast_parse_digest(const char *digest, struct ast_http_digest *d, int request,
|
||||
|
||||
c = ast_skip_blanks(ast_str_buffer(str));
|
||||
|
||||
if (strncasecmp(tmp, "Digest ", strlen("Digest "))) {
|
||||
if (strncasecmp(c, "Digest ", strlen("Digest "))) {
|
||||
ast_log(LOG_WARNING, "Missing Digest.\n");
|
||||
ast_free(str);
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user