Add validation for $priority
Valid range changed to 401-599: vhost SSL header has priority 700. If $priority is set to 400 (which resolves to 400+300=700 for SSL locations), then it would conflict with the priority of the header. It must be 401 or higher to avoid this. Top end of range is limited to 599 to reflect documentation however it could be increased to 698 and still provide expected behavior.
This commit is contained in:
Родитель
7d5cb888af
Коммит
d22402c404
|
@ -57,7 +57,7 @@
|
|||
# [*auth_basic_user_file*] - This directive sets the htpasswd filename for
|
||||
# the authentication realm.
|
||||
# [*priority*] - Location priority. Default: 500. User priority
|
||||
# 400-499, 501-599. If the priority is higher than the default priority,
|
||||
# 401-499, 501-599. If the priority is higher than the default priority,
|
||||
# the location will be defined after root, or before root.
|
||||
#
|
||||
#
|
||||
|
@ -131,6 +131,12 @@ define nginx::resource::location (
|
|||
}
|
||||
|
||||
validate_array($index_files)
|
||||
if !is_integer($priority) {
|
||||
fail("$priority must be an integer.")
|
||||
}
|
||||
if ($priority < 401) or ($priority > 599) {
|
||||
fail("$priority must be in the range 401-599. It was set to ${priority}.")
|
||||
}
|
||||
|
||||
# # Shared Variables
|
||||
$ensure_real = $ensure ? {
|
||||
|
|
Загрузка…
Ссылка в новой задаче