mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Core: limited levels of subdirectory hierarchy used for temp files.
Similar to ngx_http_file_cache_set_slot(), the last component of file->name with a fixed length of 10 bytes, as generated in ngx_create_temp_path(), is used as a source for the names of intermediate subdirectories with each one taking its own part. Ensure that the sum of specified levels with slashes fits into the length (ticket #731).
This commit is contained in:
parent
256082c4f8
commit
38a97edf3a
@ -372,6 +372,10 @@ ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
path->len += level + 1;
|
||||
}
|
||||
|
||||
if (path->len > 10 + i) {
|
||||
return "invalid value";
|
||||
}
|
||||
|
||||
*slot = path;
|
||||
|
||||
if (ngx_add_path(cf, slot) == NGX_ERROR) {
|
||||
|
Loading…
Reference in New Issue
Block a user