diff options
author | Chris Ball <cjb@laptop.org> | 2010-04-05 13:09:29 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2010-04-05 13:09:29 -0400 |
commit | dc553ec9c0a172c51a69ce2fe9599c1123d493ba (patch) | |
tree | 7812a71d45caf8d629aa4856e7fab6985c025e3f /etherpad/src/main.js | |
parent | 6d5f97d67df88ba77cb38f62c08dcba9fe306f87 (diff) | |
download | etherpad-dc553ec9c0a172c51a69ce2fe9599c1123d493ba.tar.gz etherpad-dc553ec9c0a172c51a69ce2fe9599c1123d493ba.tar.bz2 etherpad-dc553ec9c0a172c51a69ce2fe9599c1123d493ba.zip |
Make config parsing more robust
Previously, config booleans like etherpad.isProduction accepted only
"true", and not "true " or " true" or "True" or "TRUE". Fix that.
Diffstat (limited to 'etherpad/src/main.js')
-rw-r--r-- | etherpad/src/main.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etherpad/src/main.js b/etherpad/src/main.js index 745f5fa..c881223 100644 --- a/etherpad/src/main.js +++ b/etherpad/src/main.js @@ -259,7 +259,8 @@ function checkRequestIsWellFormed() { // checkHost() //---------------------------------------------------------------- function checkHost() { - if (appjet.config['etherpad.skipHostnameCheck'] == "true") { + var trueRegex = /\s*true\s*/i; + if (trueRegex.test(appjet.config['etherpad.skipHostnameCheck'])) { return; } |