diff --git a/Makefile b/Makefile index 38dc8d2..e280a81 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ distclean: clean echo -e '' > ca/index.php echo ' config.php - echo 'define(PHPKI_VERSION, "$(VERSION)");' >> config.php + echo 'define("PHPKI_VERSION", "$(VERSION)");' >> config.php echo '?>' >> config.php rm -f index.php setup.php diff --git a/config.php b/config.php index 188ac19..e89a276 100644 --- a/config.php +++ b/config.php @@ -1,3 +1,3 @@ diff --git a/include/common.php b/include/common.php index d7a9692..90f078c 100644 --- a/include/common.php +++ b/include/common.php @@ -2,7 +2,7 @@ umask(0007); -if ($_SERVER['PHP_AUTH_USER']) +if (isset($_SERVER['PHP_AUTH_USER'])) $PHPki_user = md5($_SERVER['PHP_AUTH_USER']); else $PHPki_user = md5('default'); diff --git a/include/my_functions.php b/include/my_functions.php index 138bc03..ee3f998 100644 --- a/include/my_functions.php +++ b/include/my_functions.php @@ -64,8 +64,8 @@ function upload($source, $destination, $content_type="application/octet-stream") function gpvar($v) { global $_GET, $_POST; $x = ""; - if ($_GET[$v]) $x = $_GET[$v]; - if ($_POST[$v]) $x = $_POST[$v]; + if (isset($_GET[$v])) $x = $_GET[$v]; + if (isset($_POST[$v])) $x = $_POST[$v]; if (get_magic_quotes_gpc()) $x = stripslashes($x); return $x; } diff --git a/setup.php-presetup b/setup.php-presetup index b98b8b1..dfa845f 100644 --- a/setup.php-presetup +++ b/setup.php-presetup @@ -109,7 +109,7 @@ case 'validate': if ( $passwd and $passwd != $passwdv ) $er .= 'Password and password verification do not match.
'; - if ( $email && ! is_email($contact) ) + if ( $contact && ! is_email($contact) ) $er .= 'E-mail address ('. htvar($contact) . ') may be invalid.
'; if (strpos($store_dir,$_SERVER['DOCUMENT_ROOT']) === 0) @@ -739,7 +739,7 @@ E-mail: someone@somewhere.com &nbs Password *
This password will be used to protect your root certificate private - key. Do not lose or forget this password. + key.
Can't contain single quote ! Do not lose or forget this password.    Again