Skip to content

Commit 7cb22a6

Browse files
author
bnu
committed
Merge branch 'hotfix/1.7.7'
2 parents 826d7f6 + 40bc4c1 commit 7cb22a6

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

classes/context/Context.class.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,15 +1267,17 @@ function _filterRequestVar($key, $val, $do_stripslashes = 1)
12671267
$val = array($val);
12681268
}
12691269

1270+
$result = array();
12701271
foreach($val as $k => $v)
12711272
{
1273+
$k = htmlentities($k);
12721274
if($key === 'page' || $key === 'cpage' || substr_compare($key, 'srl', -3) === 0)
12731275
{
1274-
$val[$k] = !preg_match('/^[0-9,]+$/', $v) ? (int) $v : $v;
1276+
$result[$k] = !preg_match('/^[0-9,]+$/', $v) ? (int) $v : $v;
12751277
}
12761278
elseif($key === 'mid' || $key === 'vid' || $key === 'search_keyword')
12771279
{
1278-
$val[$k] = htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', FALSE);
1280+
$result[$k] = htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', FALSE);
12791281
}
12801282
else
12811283
{
@@ -1286,12 +1288,12 @@ function _filterRequestVar($key, $val, $do_stripslashes = 1)
12861288

12871289
if(!is_array($v))
12881290
{
1289-
$val[$k] = trim($v);
1291+
$result[$k] = trim($v);
12901292
}
12911293
}
12921294
}
12931295

1294-
return $isArray ? $val : $val[0];
1296+
return $isArray ? $result : $result[0];
12951297
}
12961298

12971299
/**

config/config.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/**
3030
* Display XE's full version.
3131
*/
32-
define('__XE_VERSION__', '1.7.6');
32+
define('__XE_VERSION__', '1.7.7');
3333
define('__XE_VERSION_ALPHA__', (stripos(__XE_VERSION__, 'alpha') !== false));
3434
define('__XE_VERSION_BETA__', (stripos(__XE_VERSION__, 'beta') !== false));
3535
define('__XE_VERSION_RC__', (stripos(__XE_VERSION__, 'rc') !== false));

modules/member/member.controller.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,8 +1873,7 @@ function setSessionInfo()
18731873
function validateSession()
18741874
{
18751875
$destory_session = false;
1876-
1877-
if($_SESSION['ipaddress'] != $_SERVER['REMOTE_ADDR']) $destory_session = true;
1876+
if($_SESSION['destroyed'] === true) $destory_session = true;
18781877

18791878
if($destory_session)
18801879
{
@@ -1887,9 +1886,16 @@ function validateSession()
18871886

18881887
function regenerateSession()
18891888
{
1890-
if(!$_SESSION['session_checkup'] || time() - $_SESSION['session_checkup'] > 30)
1889+
if(!$_SESSION['session_checkup'])
1890+
{
1891+
$_SESSION['session_checkup'] = time();
1892+
}
1893+
1894+
if(time() - $_SESSION['session_checkup'] >= 1)
18911895
{
1892-
session_regenerate_id(true);
1896+
$_SESSION['destroyed'] = true;
1897+
session_regenerate_id();
1898+
$_SESSION['destroyed'] = false;
18931899
$_SESSION['session_checkup'] = time();
18941900
}
18951901
}

modules/member/skins/default/find_member_account.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h1>{$lang->cmd_find_member_account_with_email}</h1>
66
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skin/default/find_member_account/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
77
<p>{$XE_VALIDATOR_MESSAGE}</p>
88
</div>
9-
<form action="{getUrl('')}" method="get" ruleset="findAccount">
9+
<form action="{getUrl('', 'act', 'procMemberFindAccount')}" method="get" ruleset="findAccount">
1010
<input type="hidden" name="mid" value="{$mid}" />
1111
<input type="hidden" name="act" value="procMemberFindAccount" />
1212
<input type="hidden" name="document_srl" value="{$document_srl}" />
@@ -25,7 +25,7 @@ <h1>{$lang->cmd_find_member_account_with_email_question}</h1>
2525
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skin/default/find_member_account/2'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
2626
<p>{$XE_VALIDATOR_MESSAGE}</p>
2727
</div>
28-
<form action="./" method="get" ruleset="@find_member_account_by_question">
28+
<form action="{getUrl('', 'act', 'procMemberFindAccountByQuestion')}" method="get" ruleset="@find_member_account_by_question">
2929
<input type="hidden" name="module" value="member" />
3030
<input type="hidden" name="mid" value="{$mid}" />
3131
<input type="hidden" name="document_srl" value="{$document_srl}" />
@@ -59,7 +59,7 @@ <h1>{$lang->cmd_resend_auth_mail}</h1>
5959
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skin/default/find_member_account/3'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
6060
<p>{$XE_VALIDATOR_MESSAGE}</p>
6161
</div>
62-
<form ruleset="resendAuthMail" action="./" method="post">
62+
<form ruleset="resendAuthMail" action="{getUrl('', 'act', 'procMemberResendAuthMail')}" method="post">
6363
<input type="hidden" name="module" value="member" />
6464
<input type="hidden" name="act" value="procMemberResendAuthMail" />
6565
<input type="hidden" name="success_return_url" value="{getUrl(act, $act)}" />

0 commit comments

Comments
 (0)