summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-04 14:49:31 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-04 14:49:31 +0000
commit2e0a4d26af0d47b177fd855ba5dfc1d8c50aa929 (patch)
tree1f89d1043ad0cabeb4185a1327c7827d03df4d61 /install.php
parentd51625c304000f5ec1d5c6c3cf06e9e58be93a25 (diff)
downloadbrdo-2e0a4d26af0d47b177fd855ba5dfc1d8c50aa929.tar.gz
brdo-2e0a4d26af0d47b177fd855ba5dfc1d8c50aa929.tar.bz2
- Patch #482646 by Dave Reid et al: check for existence of ['HTTP_USER_AGENT'] for the SimpleTest user agent.
Diffstat (limited to 'install.php')
-rw-r--r--install.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/install.php b/install.php
index 4c0face7e..1d94a7fb3 100644
--- a/install.php
+++ b/install.php
@@ -28,7 +28,7 @@ function install_main() {
// The user agent header is used to pass a database prefix in the request when
// running tests. However, for security reasons, it is imperative that no
// installation be permitted using such a prefix.
- if (preg_match("/^simpletest\d+$/", $_SERVER['HTTP_USER_AGENT'])) {
+ if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^simpletest\d+$/", $_SERVER['HTTP_USER_AGENT'])) {
header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
exit;
}