What can unlogged-in users read, where are the permission boundaries of the content system likely to leak?
What content can unregistered users actually read, which is often not determined by the visibility of the main article, but by the respective boundaries of the attached objects and interface layers. A private text is blocked, but if its comments, attachments, and preview addresses are not tightened together, it is equivalent to opening another path through the side door. The places where permission boundaries are prone to leaks are mostly not on the list page, but on these several easily ignored paths.
A recent public security announcement exactly illustrates this: WordPress fixed the issue in version 7.1.3 where comments on private and unpublished posts could be read by unauthorized users. The main content itself is private, but the problem lies in the fact that the附属 data of comments does not inherit the visibility judgment of the main content - which is almost the most typical form of unauthorized access.
The main content was preserved, but why did the附属 data leak?
The main article and its mounted data are usually two sets of read logic. The main text follows content permission judgment, while comments, attachments, and custom fields often go through independent query interfaces. It is easy to default to '附属数据跟着主内容走' when writing, but in actual execution, the comment interface may only return based on 'whether the article ID exists' without checking whether the current status of this article is private or not published.
The leak point is in this sentence: The state filter is only written on one side of the main content. If any child resource query bypasses the state judgment, private content is exposed in fragments. Attachments, comments, messages, and related recommendation lists all belong to this kind of 'Looking at someone else's field, but it is actually the boundary you should guard.'
The most easily overlooked filter at the interface layer
The list interface is the second leak point. The detail interface checks whether a single article is readable, but the list interface often returns entries directly by category or tag, bringing out records from 'Unpublished' and 'Recycle Bin'. Every additional status returned by the interface is a piece of content overstepping its authority.
There is a more concealed location: search and aggregation. In-site search combines the title, abstract, and text snippet to return results. If the index is not filtered by status, private titles may appear in the results as 'hit snippets'.
How to define the boundary between preview and draft?
The draft preview is intentionally designed but should have boundaries. The document status is generally divided into four categories: official, draft, pending release, and recycling bin: pending release is scheduled but not yet at the point, draft is still being edited, and recycling bin is deleted and waiting to be cleaned up. The preview link for editing and proofreading is a reasonable requirement, but the question is whether it is long-term effective, whether it can be indexed by search engines, and whether it can still be accessed after leaving.
The safe way is to use signed short-term links for previews and ensure that the preview address does not participate in crawling. Formal documents should be moved to the recycle bin instead of being physically deleted, and recovery should only occur at controlled entry points to avoid publicly exposed deleted data being read back by public interfaces.
Three-level control within the site
Within the site, generally, the boundary is sealed with three layers: user groups determine the range visible when logging in or not, document status determines the lifecycle of the content itself, and the scope of interface exposure determines which capabilities are open by default to tools.
| Control layer | What does it manage? | Typical leak points | Sealing method |
|---|---|---|---|
| User group permissions | What content can the unlogged / ordinary / VIP groups access | Only block the page, not the interface | Permission judgment sinks to the data query layer |
| Document status | Visibility of formal, draft, pending release, and recycling station | Child resources do not inherit status filtering | All comments and attachments must check the main content status |
| Interface exposure | Whether the high-risk capability can be adjusted externally | Default access to all-site operations | High-risk domains are closed by default and need to be explicitly opened |
AnQiCMS corresponds to these three points by: User management and VIP grouping are used to set access permissions for different user groups; Document status is distinguished between formal, draft, to be published, and recycling bin, with deletion going to the recycling bin instead of physical deletion; Interfaces are set according to the capability domain to set the exposure range, backup, upgrade, and multi-site operations such as these are set to default closed, and need to be explicitly enabled to be accessible. Only when the three overlap can the 'sideways door' be blocked one by one.
Common questions
Question: Is it enough to block only the details page of private articles?Answer: Not enough. Comments, attachments, search snippets, and list interfaces are independent read paths. Any one that does not perform state filtering will leak. Permission judgment should fall to the data query layer, not just at the page rendering layer.
Question: Will the draft preview link be caught by search engines?Answer: It should be treated differently. The preview entry should not be indexed and the link should be short-lived; if the preview address is long-term and can be indexed, it is equivalent to publicly releasing unissued content.
Question: Why should high-risk interfaces be closed by default?The default open means that any available credential or bypassed authentication can trigger a full-site operation. Setting the exposure range of capabilities such as multi-site and backup to default closed is to narrow the impact radius once unauthorized.