mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-23 20:11:49 +00:00
Merge pull request #132 from hendrikp/master
Fixed crash and description for digest authentication
This commit is contained in:
commit
9e07c742ff
2 files changed
+9
-1
No files matched your search
+8
-1
@@ -186,11 +186,18 @@ working directory. If absent (default), then errors are not logged.
|
|||||||
### enable\_directory\_listing `yes`
|
### enable\_directory\_listing `yes`
|
||||||
Enable directory listing, either `yes` or `no`.
|
Enable directory listing, either `yes` or `no`.
|
||||||
|
|
||||||
### global\_passwords\_file
|
### global\_auth\_file
|
||||||
Path to a global passwords file, either full path or relative to the current
|
Path to a global passwords file, either full path or relative to the current
|
||||||
working directory. If set, per-directory `.htpasswd` files are ignored,
|
working directory. If set, per-directory `.htpasswd` files are ignored,
|
||||||
and all requests are authorised against that file.
|
and all requests are authorised against that file.
|
||||||
|
|
||||||
|
The file has to include the realm set through `authentication_domain` and the password in digest format:
|
||||||
|
|
||||||
|
user:realm:digest
|
||||||
|
test:test.com:ce0220efc2dd2fad6185e1f1af5a4327
|
||||||
|
|
||||||
|
(e.g. use [this generator](http://www.askapache.com/online-tools/htpasswd-generator))
|
||||||
|
|
||||||
### index_files `index.html,index.htm,index.cgi,index.shtml,index.php`
|
### index_files `index.html,index.htm,index.cgi,index.shtml,index.php`
|
||||||
Comma-separated list of files to be treated as directory index
|
Comma-separated list of files to be treated as directory index
|
||||||
files.
|
files.
|
||||||
|
|||||||
@@ -5017,6 +5017,7 @@ static void process_new_connection(struct mg_connection *conn) {
|
|||||||
}
|
}
|
||||||
if (ri->remote_user != NULL) {
|
if (ri->remote_user != NULL) {
|
||||||
free((void *) ri->remote_user);
|
free((void *) ri->remote_user);
|
||||||
|
ri->remote_user = NULL; // when having connections with and without auth would cause double free and then crash
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE(lsm): order is important here. should_keep_alive() call
|
// NOTE(lsm): order is important here. should_keep_alive() call
|
||||||
|
|||||||
Reference in new issue
Block a user