Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
mongoose
Commits
6f4c21c2
Commit
6f4c21c2
authored
8 years ago
by
Deomid Ryabkov
Committed by
rojer
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not bypass auth when handling CGI request
PUBLISHED_FROM=9faccf9fedd92d0fb54b7ff660c0cf99c1cbdb74
parent
50606404
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
mongoose.c
mongoose.c
+6
-7
No files found.
mongoose.c
View file @
6f4c21c2
...
...
@@ -7398,13 +7398,6 @@ MG_INTERNAL void mg_send_http_file(struct mg_connection *nc, char *path,
/* If we have path_info, the only way to handle it is CGI. */
if
(
path_info
->
len
>
0
&&
!
is_cgi
)
{
mg_http_send_http_error
(
nc
,
501
,
NULL
);
return
;
}
else
if
(
is_cgi
)
{
#if !defined(MG_DISABLE_CGI)
mg_handle_cgi
(
nc
,
index_file
?
index_file
:
path
,
path_info
,
hm
,
opts
);
#else
mg_http_send_http_error
(
nc
,
501
,
NULL
);
#endif
/* MG_DISABLE_CGI */
MG_FREE
(
index_file
);
return
;
}
...
...
@@ -7416,6 +7409,12 @@ MG_INTERNAL void mg_send_http_file(struct mg_connection *nc, char *path,
!
mg_is_authorized
(
hm
,
path
,
is_directory
,
opts
->
auth_domain
,
opts
->
per_directory_auth_file
,
0
))
{
mg_http_send_digest_auth_request
(
nc
,
opts
->
auth_domain
);
}
else
if
(
is_cgi
)
{
#if !defined(MG_DISABLE_CGI)
mg_handle_cgi
(
nc
,
index_file
?
index_file
:
path
,
path_info
,
hm
,
opts
);
#else
mg_http_send_http_error
(
nc
,
501
,
NULL
);
#endif
/* MG_DISABLE_CGI */
}
else
if
((
!
exists
||
mg_is_file_hidden
(
path
,
opts
,
0
/* specials are ok */
))
&&
!
mg_is_creation_request
(
hm
))
{
...
...
This diff is collapsed.
Click to expand it.
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