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
a57f2cf7
Commit
a57f2cf7
authored
Dec 03, 2010
by
Arnout Vandecappelle (Essensium/Mind)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do authentication before trying NEW_REQUEST callback.
parent
a9b6eb18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mongoose.c
mongoose.c
+3
-3
No files found.
mongoose.c
View file @
a57f2cf7
...
...
@@ -3227,10 +3227,10 @@ static void handle_request(struct mg_connection *conn) {
convert_uri_to_file_name
(
conn
,
ri
->
uri
,
path
,
sizeof
(
path
));
DEBUG_TRACE
((
"%s"
,
ri
->
uri
));
if
(
call_user
(
conn
,
MG_NEW_REQUEST
)
!=
NULL
)
{
// Do nothing, callback has served the request
}
else
if
(
!
check_authorization
(
conn
,
path
))
{
if
(
!
check_authorization
(
conn
,
path
))
{
send_authorization_request
(
conn
);
}
else
if
(
call_user
(
conn
,
MG_NEW_REQUEST
)
!=
NULL
)
{
// Do nothing, callback has served the request
}
else
if
(
strstr
(
path
,
PASSWORDS_FILE_NAME
))
{
// Do not allow to view passwords files
send_http_error
(
conn
,
403
,
"Forbidden"
,
"Access Forbidden"
);
...
...
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