Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
c18828af
Commit
c18828af
authored
Mar 01, 2016
by
Deomid Ryabkov
Committed by
rojer
Mar 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Digest auth fixes
PUBLISHED_FROM=dda24a5bdb42848a74460865dd23794941b46bd4
parent
8a5f8439
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
mongoose.c
mongoose.c
+6
-4
No files found.
mongoose.c
View file @
c18828af
...
@@ -5917,7 +5917,7 @@ int mg_http_create_digest_auth_header(char *buf, size_t buf_len,
...
@@ -5917,7 +5917,7 @@ int mg_http_create_digest_auth_header(char *buf, size_t buf_len,
static
int
check_nonce
(
const
char
*
nonce
)
{
static
int
check_nonce
(
const
char
*
nonce
)
{
unsigned
long
now
=
(
unsigned
long
)
time
(
NULL
);
unsigned
long
now
=
(
unsigned
long
)
time
(
NULL
);
unsigned
long
val
=
(
unsigned
long
)
strtoul
(
nonce
,
NULL
,
16
);
unsigned
long
val
=
(
unsigned
long
)
strtoul
(
nonce
,
NULL
,
16
);
return
1
||
now
<
val
||
now
-
val
<
3600
;
return
now
<
val
||
now
-
val
<
3600
;
}
}
/*
/*
...
@@ -5956,9 +5956,11 @@ static int mg_http_check_digest_auth(struct http_message *hm,
...
@@ -5956,9 +5956,11 @@ static int mg_http_check_digest_auth(struct http_message *hm,
/* NOTE(lsm): due to a bug in MSIE, we do not compare URIs */
/* NOTE(lsm): due to a bug in MSIE, we do not compare URIs */
strcmp
(
auth_domain
,
f_domain
)
==
0
)
{
strcmp
(
auth_domain
,
f_domain
)
==
0
)
{
/* User and domain matched, check the password */
/* User and domain matched, check the password */
mkmd5resp
(
hm
->
method
.
p
,
hm
->
method
.
len
,
hm
->
uri
.
p
,
hm
->
uri
.
len
,
f_ha1
,
mkmd5resp
(
strlen
(
f_ha1
),
nonce
,
strlen
(
nonce
),
nc
,
strlen
(
nc
),
cnonce
,
hm
->
method
.
p
,
hm
->
method
.
len
,
hm
->
uri
.
p
,
strlen
(
cnonce
),
qop
,
strlen
(
qop
),
expected_response
);
hm
->
uri
.
len
+
(
hm
->
query_string
.
len
?
hm
->
query_string
.
len
+
1
:
0
),
f_ha1
,
strlen
(
f_ha1
),
nonce
,
strlen
(
nonce
),
nc
,
strlen
(
nc
),
cnonce
,
strlen
(
cnonce
),
qop
,
strlen
(
qop
),
expected_response
);
return
mg_casecmp
(
response
,
expected_response
)
==
0
;
return
mg_casecmp
(
response
,
expected_response
)
==
0
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment