SkyeYoung commented on code in PR #12603: URL: https://github.com/apache/apisix/pull/12603#discussion_r2347699802
########## apisix/admin/utils.lua: ########## @@ -106,7 +106,7 @@ function _M.decrypt_params(decrypt_func, body, schema_type) -- metadata if schema_type == core.schema.TYPE_METADATA then local conf = body.node and body.node.value - decrypt_func(conf.name, conf, schema_type) Review Comment: There is an amazing problem here: In `error-log-logger.lua`, the following code exists: https://github.com/apache/apisix/blob/36b2b83653adfa1ad0f45b8d4bb33686a6550550/apisix/plugins/error-log-logger.lua#L130 This is a field not marked in the document. The intention of its design cannot be seen from the original PR https://github.com/apache/apisix/pull/2592. At the same time, it is also the only one that contains `encrypt_fields` in `metadata_schema`. https://github.com/apache/apisix/blob/36b2b83653adfa1ad0f45b8d4bb33686a6550550/apisix/plugins/error-log-logger.lua#L149 This causes this logic in the actual `decrypt_params` to take effect only for `error-log-logger.lua`. However, due to the cancellation of the default value padding, this logic no longer takes effect. **I think this is wrong. And it needs to be repaired in subsequent PRs.** The reasons are as follows: 1. There should not be a hidden property in the schema that is used for plugin-unrelated logic. 2. https://github.com/apache/apisix/pull/11452 implements a standardized `id`, which can be consistent with other resources. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org