Permalink
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...
1 parent 38e114c commit 5e7722b0a2c30d161c6b54d9046f56ca40e9e6fc @FooBarWidget FooBarWidget committed Nov 21, 2010
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
@@ -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;

0 comments on commit 5e7722b

Please sign in to comment.