Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

passenger_enabled now only accepts 'on' or 'off' values.

Previously it would recognize any value not equal to 'on' as meaning
'off'. This caused confusion among users who thought they could also
specify 'true', so we now throw a proper error if the value is
unrecognized. Fixes issue #583.
  • Loading branch information...
commit 5e7722b0a2c30d161c6b54d9046f56ca40e9e6fc 1 parent 38e114c
@FooBarWidget FooBarWidget authored
Showing with 12 additions and 1 deletion.
  1. +5 −0 NEWS
  2. +7 −1 ext/nginx/Configuration.c
View
5 NEWS
@@ -41,6 +41,11 @@ Release 3.0.1
constructs that we used in the Nginx configure script.
* [Nginx] Upgraded default Nginx version to to 0.8.53
The previous default was 0.8.52.
+ * [Nginx] passenger_enabled now only accepts 'on' or 'off' values
+ Previously it would recognize any value not equal to 'on' as meaning
+ 'off'. This caused confusion among users who thought they could also
+ specify 'true', so we now throw a proper error if the value is
+ unrecognized. Fixes issue #583.
Release 3.0.0
View
8 ext/nginx/Configuration.c
@@ -827,8 +827,14 @@ passenger_enabled(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
&& clcf->name.data[clcf->name.len - 1] == '/') {
clcf->auto_redirect = 1;
}
- } else {
+ } else if (ngx_strcasecmp(value[1].data, (u_char *) "off") == 0) {
passenger_conf->enabled = 0;
+ } else {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "\"passenger_enabled\" must be either set to \"on\" "
+ "or \"off\"");
+
+ return NGX_CONF_ERROR;
}
return NGX_CONF_OK;
Please sign in to comment.
Something went wrong with that request. Please try again.