mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/9662] Search flood interval no longer applies to non-keyword searches [ticket/9615] magic_quotes_gpc: call stripslashes() before utf8_basename()
This commit is contained in:
commit
ea4d204cf6
2 changed files with 6 additions and 4 deletions
|
@ -58,8 +58,9 @@ class filespec
|
|||
|
||||
$this->filename = $upload_ary['tmp_name'];
|
||||
$this->filesize = $upload_ary['size'];
|
||||
$name = trim(utf8_htmlspecialchars(utf8_basename($upload_ary['name'])));
|
||||
$this->realname = $this->uploadname = (STRIP) ? stripslashes($name) : $name;
|
||||
$name = (STRIP) ? stripslashes($upload_ary['name']) : $upload_ary['name'];
|
||||
$name = trim(utf8_htmlspecialchars(utf8_basename($name)));
|
||||
$this->realname = $this->uploadname = $name;
|
||||
$this->mimetype = $upload_ary['type'];
|
||||
|
||||
// Opera adds the name to the mime type
|
||||
|
|
|
@ -81,9 +81,10 @@ if ($user->load && $config['limit_search_load'] && ($user->load > doubleval($con
|
|||
trigger_error('NO_SEARCH_TIME');
|
||||
}
|
||||
|
||||
// Check flood limit ... if applicable
|
||||
// It is applicable if the configuration setting is non-zero, and the user cannot
|
||||
// ignore the flood setting, and the search is a keyword search.
|
||||
$interval = ($user->data['user_id'] == ANONYMOUS) ? $config['search_anonymous_interval'] : $config['search_interval'];
|
||||
if ($interval && !$auth->acl_get('u_ignoreflood'))
|
||||
if ($interval && !in_array($search_id, array('unreadposts', 'unanswered', 'active_topics', 'egosearch')) && !$auth->acl_get('u_ignoreflood'))
|
||||
{
|
||||
if ($user->data['user_last_search'] > time() - $interval)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue