diff --git a/public/include/classes/user.class.php b/public/include/classes/user.class.php index 677acf47..6c5e65ed 100644 --- a/public/include/classes/user.class.php +++ b/public/include/classes/user.class.php @@ -427,7 +427,7 @@ class User extends Base { session_regenerate_id(true); // Enforce a page reload and point towards login with referrer included, if supplied $port = ($_SERVER["SERVER_PORT"] == "80" or $_SERVER["SERVER_PORT"] == "443") ? "" : (":".$_SERVER["SERVER_PORT"]); - $location = @$_SERVER['HTTPS'] ? 'https://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['PHP_SELF'] : 'http://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['PHP_SELF']; + $location = @$_SERVER['HTTPS'] ? 'https://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['SCRIPT_NAME'] : 'http://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['SCRIPT_NAME']; if (!empty($from)) $location .= '?page=login&to=' . urlencode($from); // if (!headers_sent()) header('Location: ' . $location); exit(''); @@ -504,7 +504,7 @@ class User extends Base { public function register($username, $password1, $password2, $pin, $email1='', $email2='', $tac='', $strToken='') { $this->debug->append("STA " . __METHOD__, 4); if ($tac != 1) { - $this->setErrorMessage('You need to accept our Terms and Conditions'); + $this->setErrorMessage('You need to accept our Terms and Conditions'); return false; } if (strlen($username) > 40) { diff --git a/public/include/pages/login.inc.php b/public/include/pages/login.inc.php index 4ed4e26f..e7cbaffa 100644 --- a/public/include/pages/login.inc.php +++ b/public/include/pages/login.inc.php @@ -6,7 +6,7 @@ if (!defined('SECURITY')) die('Hacking attempt'); if ($setting->getValue('maintenance') && !$user->isAdmin($user->getUserId($_POST['username']))) { $_SESSION['POPUP'][] = array('CONTENT' => 'You are not allowed to login during maintenace.', 'TYPE' => 'info'); } else if ($user->checkLogin(@$_POST['username'], @$_POST['password']) ) { - empty($_POST['to']) ? $to = $_SERVER['PHP_SELF'] : $to = $_POST['to']; + empty($_POST['to']) ? $to = $_SERVER['SCRIPT_NAME'] : $to = $_POST['to']; $port = ($_SERVER["SERVER_PORT"] == "80" or $_SERVER["SERVER_PORT"] == "443") ? "" : (":".$_SERVER["SERVER_PORT"]); $location = @$_SERVER['HTTPS'] === true ? 'https://' . $_SERVER['SERVER_NAME'] . $port . $to : 'http://' . $_SERVER['SERVER_NAME'] . $port . $to; if (!headers_sent()) header('Location: ' . $location); diff --git a/public/templates/mail/invitations/body.tpl b/public/templates/mail/invitations/body.tpl index c0adb7ff..17294318 100644 --- a/public/templates/mail/invitations/body.tpl +++ b/public/templates/mail/invitations/body.tpl @@ -2,7 +2,7 @@
Hello valued miner,
{nocache}{$DATA.username}{/nocache} invited you to participate on this pool: -
http://{$smarty.server.SERVER_NAME}{$smarty.server.PHP_SELF}?page=register&token={nocache}{$DATA.token}{/nocache}
+http://{$smarty.server.SERVER_NAME}{$smarty.server.SCRIPT_NAME}?page=register&token={nocache}{$DATA.token}{/nocache}
{if $DATA.message}Personal message:
{nocache}{$DATA.message}{/nocache}
{/if}Cheers,
diff --git a/public/templates/mail/notifications/locked.tpl b/public/templates/mail/notifications/locked.tpl index fcf1ccfa..7cfacfba 100644 --- a/public/templates/mail/notifications/locked.tpl +++ b/public/templates/mail/notifications/locked.tpl @@ -1,7 +1,7 @@You account has been locked due to too many failed password or PIN attempts. Please follow the URL below to unlock your account.
-http://{$smarty.server.SERVER_NAME}{$smarty.server.PHP_SELF}?page=account&action=unlock&token={nocache}{$DATA.token}{/nocache}
+http://{$smarty.server.SERVER_NAME}{$smarty.server.SCRIPT_NAME}?page=account&action=unlock&token={nocache}{$DATA.token}{/nocache}
Hello {nocache}{$DATA.username}{/nocache},
You have requested a password reset through our online form. In order to complete the request please follow this link:
-http://{$smarty.server.SERVER_NAME}{$smarty.server.PHP_SELF}?page=password&action=change&token={nocache}{$DATA.token}{/nocache}
+http://{$smarty.server.SERVER_NAME}{$smarty.server.SCRIPT_NAME}?page=password&action=change&token={nocache}{$DATA.token}{/nocache}
You will be asked to change your password. You can then use this new password to login to your account.
Cheers,
Website Administration
diff --git a/public/templates/mail/register/confirm_email.tpl b/public/templates/mail/register/confirm_email.tpl index 66c54d78..962793c0 100644 --- a/public/templates/mail/register/confirm_email.tpl +++ b/public/templates/mail/register/confirm_email.tpl @@ -2,7 +2,7 @@Hello {nocache}{$DATA.username}{/nocache},
You have created a new account. In order to complete the registration process please follow this link:
-http://{$smarty.server.SERVER_NAME}{$smarty.server.PHP_SELF}?page=account&action=confirm&token={nocache}{$DATA.token}{/nocache}
+http://{$smarty.server.SERVER_NAME}{$smarty.server.SCRIPT_NAME}?page=account&action=confirm&token={nocache}{$DATA.token}{/nocache}
Cheers,
Website Administration
diff --git a/public/templates/mobile/dashboard/js.tpl b/public/templates/mobile/dashboard/js.tpl index 213a65fa..bdb61889 100644 --- a/public/templates/mobile/dashboard/js.tpl +++ b/public/templates/mobile/dashboard/js.tpl @@ -4,7 +4,7 @@ $(document).ready(function(){ var g1, g2, g3, g4, g5; // Ajax API URL - var url = "{/literal}{$smarty.server.PHP_SELF}?page=api&action=getdashboarddata&api_key={$GLOBAL.userdata.api_key}&id={$GLOBAL.userdata.id}{literal}"; + var url = "{/literal}{$smarty.server.SCRIPT_NAME}?page=api&action=getdashboarddata&api_key={$GLOBAL.userdata.api_key}&id={$GLOBAL.userdata.id}{literal}"; // Store our data globally var storedPersonalHashrate=[]; diff --git a/public/templates/mobile/global/navigation.tpl b/public/templates/mobile/global/navigation.tpl index 5b7af70b..bfb0ca50 100644 --- a/public/templates/mobile/global/navigation.tpl +++ b/public/templates/mobile/global/navigation.tpl @@ -5,13 +5,13 @@