crx349 發表於 2019-11-14 11:11:59

Discuz!3.4修改登录错误次数和禁止登录时间

<br /><br />使用场景:局域网内内部使用,1个账号密码错5次,全内网无法登录,需要修改适配内网使用环境<br />适用版本:X3.4 (其他版本找相同代码改)<br />修改流程:<br />1.打开source\function\function_member.php<br />2.搜索<br /><br />3.覆盖同名文件<br />4.这项修改适合内网使用,外网慎用,可以简单频繁登录容易被破解跑号。登录<em>, </em>使用<em>, </em>修改<em>, </em>错误<em>, </em>内网

xukunpeng88888 發表於 2019-11-14 11:16:05

谢谢,太感谢了,正遇到这个问题

s36376149 發表於 2019-11-14 13:28:34

也只是内网会这样!!外网的话换IP好像也是一样的!

dazhu 發表於 2019-11-14 15:36:09

看看,很有用这个

pcinstall 發表於 2019-11-19 12:20:35

看看

xukunpeng88888 發表於 2019-11-22 14:43:44

按照这个修改了,900也修改为1了,但是仍然提示 15分钟后再试啊<br />

xukunpeng88888 發表於 2019-11-22 14:44:36

不行,将900改为1,还是提示15分钟后重试

xukunpeng88888 發表於 2019-11-22 14:46:26

发现还有这样一串代码:<br /><ol><li>$return = (!$login || (TIMESTAMP - $login['lastupdate'] &gt; 1)) ? 500 : max(0, 500 - $login['count']);<br /><li><br /><li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!$login) {<br /><li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C::t('common_failedlogin')-&gt;insert(array(<br /><li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'ip' =&gt; $_G['clientip'],<br /><li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'count' =&gt; 0,<br /><li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'lastupdate' =&gt; TIMESTAMP<br /><li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ), false, true);<br /><li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } elseif(TIMESTAMP - $login['lastupdate'] &gt; 900) {<br /><li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C::t('common_failedlogin')-&gt;insert(array(<br /><li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'ip' =&gt; $_G['clientip'],<br /><li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'count' =&gt; 0,<br /><li>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'lastupdate' =&gt; TIMESTAMP</ol><br />是不是后面这个900也要改成1呢?

nanabidas 發表於 2019-11-22 14:52:32

东风浩荡规范化的

我爱大波美女 發表於 2019-11-27 19:17:33

登录错误次数
頁: [1]
查看完整版本: Discuz!3.4修改登录错误次数和禁止登录时间