Feature preview
The list sorting parameter may indeed become an injection point, as the column name and direction are usually not bound by placeholders and can be directly concatenated into the query statement. Self-check should start from three aspects: enumerate all entry points that can accept sorting parameters, perform whitelist validation for column names and directions, and converge database account permissions. AnQiCMS fixed the injection issue of list sorting parameters in version v3.6.6 and provided corresponding upgrade suggestions.
Will the sorting parameter of the background list become an injection point? Yes, and this kind of position is often overlooked. The reason is that: in most databases, the values in the query conditions are usually bound by placeholders, but the column names and directions of sorting cannot be bound as parameters, and can only be spliced into the statement; once the external sorting field passed in is not verified before splicing, the input changes from 'select sorting method' to 'participate in constructing the statement'. Self-inspection should start from the entry enumeration, field whitelist, and account permissions.
Parameterized queries can solve value injection because they separate data from statement structure. However, the structure itself cannot be used to pass data: What ORDER BY needs is a column name or an expression, and bound variables will only treat it as a constant value, making sorting ineffective.
As a result, the common practice has degenerated into concatenation: directly appending the external field name to the statement or using a direction parameter to concatenate ASC and DESC. It's easy to judge the direction parameter, but once the field name is allowed to be input arbitrarily, the concatenation surface becomes an injection entry. Pagination size, statistical dimensions, and grouping fields are also parameters that belong to 'structure positions', and the problem is consistent.
Positions to check individually include: sorting and pagination parameters of list interfaces, sorting parameters of exports, grouping fields in search aggregation, dimensions and sorting keys of chart interfaces, as well as the sorting switch of in-site search. The judgment basis is the same: whether this value will finally appear in the structural position of the statement, rather than the conditional value position.
| Parameter Type | Can Placeholder Bind | Risk Source | Handling Method |
|---|---|---|---|
| Conditional Value | Yes | Problem Only Appears During Concatenation | Always Go with Binding |
| Sorting Column Name | usually not | directly拼进sentence structure | whitelist mapping after concatenation |
| sorting direction | usually not | concatenation can be expanded into any segment | enumerate two values, reject the rest |
| pagination quantity | Yes | type loose is exploited | force to convert to integer and set limit |
| grouping and statistical dimensions | usually not | The same problem as the sorted list name | Whitelist mapping |
The key to the whitelist approach is not to 'filter out dangerous characters', but to limit the input to a known set of available values: externally, a short key name is passed, which is then mapped to the actual column name internally. Any input not in the table is directly rejected and does not participate in the construction of the statement. Blacklist-style replacement of spaces, quotes, and comment symbols can easily be bypassed by various encodings and writing styles.
The first step is to enumerate the entry. List all sorting parameters that can be affected by external factors, including interfaces, backend pages, and open APIs. Most of the omitted ones are inconspicuous export and statistical entry points.
The second step is to verify the fields. Confirm three things for each entry: whether whitelist mapping is used, whether the direction parameter only accepts two enumeration values, and whether the numerical parameter is strictly converted. The ORM layer can bind the condition values uniformly, but the structural bit still needs to be verified by itself. AnQiCMS uses GoLang combined with the Iris framework and GORM, which is a common division in the same technical stack.
The third step is to collect permissions. Business accounts only need the minimum permissions for querying and writing, and do not need the ability to create databases, delete tables, or access cross-databases. Even if some checks are bypassed, the scope of permissions determines the potential impact.
There are existing capabilities within the site that can cover some risks: AnQiCMS built-in JWT authentication, content sensitive word filtering, and anti-crawling interference codes, used to prevent SQL injection and XSS attacks. But it is important to clarify the boundaries - these protections are for content request paths, and parameter-level checks still need to be implemented in the code, and content filtering cannot be used as a substitute for statement injection.
AnQiCMS v3.6.6 fixed the injection issue of list sorting parameters, the same version also handled the issue of login credentials of site switching being forgeable, the upgrade recommendation includes rotating the server signature key and changing the administrator password. For users, the implementation sequence is: first upgrade to the current version, then check the existing interfaces according to the above three steps, and finally, withdraw the open range of high-risk operation domains to the default state - AnQiCMS's MCP interface sets the exposure range according to the intent domain, and operations such as multi-site, backup, and upgrade at the site level are closed by default, and need to be explicitly enabled.
The self-inspection records are also worth archiving: the entry list, whitelist mapping table, and permission description are the basis for subsequent review and personnel handover.
Only do the background internal sorting interface, do you need a whitelist?Yes. The field names transmitted by the front-end can be changed externally, and if the interface does not verify, it is equivalent to giving the statement structure to the request party.
Is it safer to escape the input?The escaping process deals with quotation marks and other delimiter symbols, which cannot solve the problem of structural concatenation. The whitelist limits the value range is the right medicine.
How can you confirm that the version you are using has been fixed?Check the version number and update records, then construct an actual exceptional input for the sorting entry, and observe whether it is rejected.
Will permission convergence affect business?As long as the business account does not perform structural change operations, convergence to the minimum permission usually does not affect daily reading and writing, and even reduces the impact area of misoperation.
Preview
The problem solved by automatic title image is the lack of image and time-consuming in mass production, whether it can be used directly depends on the column risk: Information and experience columns can be reviewed first, and pages related to products, prices and compliance expressions must be confirmed manually. This article explains the sequence of image layout, automatic tags, and title description generation, as well as the inspection criteria before going online
Preview
llms.txt is still an open proposal for standardization, but it has already been adopted by some tool sides and large model manufacturers in their developer documents, and Chrome's Lighthouse will also check this file. The status of the proposal does not mean that no one is using it. What truly determines its value is the maintenance method: manual maintenance may result in two types of failures such as expired entries and actual content drift, therefore the generation entry should be the same as the sitemap, allowing the address list to be updated together with the content changes, and this file on our site is automatically generated by the system.
Preview
The login credentials used for switching sites, the difference between one-time tickets and long-term keys lies in the validity period and replayability: tickets should have a short validity period and be used only once, while long-term keys can be used repeatedly within the validity period if forged or leaked. AnQiCMS fixed the issue of login credentials for site switching being forged in v3.6.6. The upgrade recommendation includes rotating the signature key and changing the administrator's password, which is also the direct reason for doing rotation and upgrade together.