mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fix redirects in forum + polls
This commit is contained in:
parent
eb0c2a7674
commit
d5915df37e
@ -21,7 +21,7 @@ if(!$logged) {
|
||||
if(isset($_REQUEST['redirect']))
|
||||
{
|
||||
$redirect = urldecode($_REQUEST['redirect']);
|
||||
|
||||
|
||||
// should never happen, unless hacker modify the URL
|
||||
if (!str_contains($redirect, BASE_URL)) {
|
||||
error('Fatal error: Cannot redirect outside the website.');
|
||||
|
@ -19,7 +19,7 @@ if ($ret === false) {
|
||||
}
|
||||
|
||||
if(!$logged) {
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . BASE_URL . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ if ($ret === false) {
|
||||
}
|
||||
|
||||
if(!$logged) {
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . BASE_URL . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ if(!$logged) {
|
||||
$extra_url = '?action=new_post&thread_id=' . $_GET['thread_id'];
|
||||
}
|
||||
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . BASE_URL . urlencode(getLink('forum') . $extra_url) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . urlencode(getLink('forum') . $extra_url) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ if(!$logged) {
|
||||
$extra_url = '?action=new_thread§ion_id=' . $_GET['section_id'];
|
||||
}
|
||||
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . BASE_URL . urlencode(getLink('forum') . $extra_url) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . urlencode(getLink('forum') . $extra_url) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ if ($ret === false) {
|
||||
}
|
||||
|
||||
if(!$logged) {
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . BASE_URL . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ function getColorByPercent($percent)
|
||||
if($logged)
|
||||
echo $link.'?id='.$poll['id'];
|
||||
else
|
||||
echo getLink('account/manage') . '?redirect=' . BASE_URL . urlencode($link.'?id='.$poll['id']);
|
||||
echo getLink('account/manage') . '?redirect=' . urlencode($link.'?id='.$poll['id']);
|
||||
|
||||
echo '">'.$poll['question'] . '</a>
|
||||
</td>
|
||||
@ -80,7 +80,7 @@ function getColorByPercent($percent)
|
||||
if($logged)
|
||||
echo $link.'?id='.$poll['id'];
|
||||
else
|
||||
echo getLink('account/manage') . '?redirect=' . BASE_URL . urlencode($link.'?id='.$poll['id']);
|
||||
echo getLink('account/manage') . '?redirect=' . urlencode($link.'?id='.$poll['id']);
|
||||
|
||||
echo '">'.$poll['question'] . '</a>
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user