Bug #476
Subforum of password protected forum searchable
| Status: | Closed | Start date: | 10/04/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Ryan Gordon | % Done: | 100% |
|
| Category: | Search | |||
| Target version: | 1.4.10 | |||
| Reproducibility: | Always | Database Type: | ||
| Reported In MyBB Version: | 1.4.8 | Database Version: | ||
| PHP Version: | SQA assignments: | |||
| Browser: |
Description
You have this forum structure:
- Forum A (password protected)
-- Forum B (subforum of forum A)
If you use the search function the results also contain threads/posts out of forum B although you never entered the password to enter that forum.
Associated revisions
Fixes Subforum of password protected forum searchable (fixes:476)
Fixes Subforum of password protected forum searchable (fixes:476)
History
Updated by Tom Moore over 2 years ago
I've been testing this out in the latest revision from the trunk, and I can't replicate it. I've also looked at the search functions, and there is the coding there to prevent searching password-protected forums.
Can anyone else replicate?
Updated by Ryan Gordon about 2 years ago
Michael?
Updated by Michael Schlechtinger about 2 years ago
Tom Moore wrote:
I've been testing this out in the latest revision from the trunk, and I can't replicate it. I've also looked at the search functions, and there is the coding there to prevent searching password-protected forums.
Can anyone else replicate?
I just tested this with the latest trunk revision and it happened again. It's right that there is code to prevent searching password-protected forums but it seems to be on a per forum basis. That means the code does not check if the parent forum of a forum is protected.
Testing scenario:
- Category: Blah
-- Forum 1 (subforum of Blah, password protected)
--- Forum 2 (subforum of Forum 1)
Forum 2 contains a thread which appears in the search results. If I click on the subject to view the thread the board asks for the password.
Updated by Ryan Gordon about 2 years ago
- Category set to Search
- Assignee set to Ryan Gordon
- Target version set to 1.4.10
Updated by Ryan Gordon about 2 years ago
- Status changed from New to Assigned
Updated by Ryan Gordon about 2 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Applied in changeset r4545.
Updated by Michael Schlechtinger about 2 years ago
- Status changed from Resolved to Feedback
This fix causes a sql error:
MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1054 - Unknown column 'Array' in 'where clause'
Query:
SELECT t.tid, t.firstpost FROM mybb_threads t WHERE 1=1 AND t.prefix='0' AND t.fid NOT IN ('3',Array) AND t.closed NOT LIKE 'moved|%' AND LOWER(t.subject) LIKE '%test%'
Possible fix:
Open inc/functions_search.php and find:
$pass_protected_forums = get_password_protected_forums();
Below add:
$pass_protected_forums = implode(",", $pass_protected_forums);
Updated by Ryan Gordon about 2 years ago
- Status changed from Feedback to Resolved
Applied in changeset r4554.
Updated by Michael Schlechtinger about 2 years ago
- Status changed from Resolved to Closed