ravillarreal opened a new issue, #12932:
URL: https://github.com/apache/apisix/issues/12932

   ### Current Behavior
   
   Im using apisix, with standalone mode, in which ive noticed that when a env 
variable is set in apisix.yaml file, if the value is a number, it will 
automatically convert it to number, and this causes an error if the number is 
bigger than Lua's double, for example (extracted from my apisix.yaml file):
   
   ```
   plugin_configs:
     - id: 1
       plugins:
         openid-connect:
           client_id: "${{APISIX_OIDC_CLIENT_ID}}"
   ```
   
   Note the double " in the env var, still it doesnt treat it like an string
   
   The APISIX_OIDC_CLIENT_ID is set to "356002209726529540" but the value is 
casted to `"client_id":3.5600220972653e+17`
   
   This is because this code in apisix/cli/file.lua
   
   
https://github.com/apache/apisix/blob/a269d61a5b115f9350293c47c2551597efc5487c/apisix/cli/file.lua#L127C17-L128C48
   
   ### Expected Behavior
   
   I expect that the value passed in as "${{var}}" works like an string
   
   ### Error Logs
   
   `2026/01/22 06:11:11 [error] 57#57: *321192 [lua] config_yaml.lua:333: 
failed to check item data of [plugin_configs] err:failed to check the 
configuration of plugin openid-connect err: property "client_id" validation 
failed: wrong type: expected string, got number ,val:`
   
   ### Steps to Reproduce
   
   1. Run APISIX via the docker image
   2. Configure it as standalone mode with env variable - 
APISIX_DEPLOYMENT_MODE=standalone
   3. Configure env variable with number inside bigger than lua's double eg 
"356002209726529540"
   4. Set the variable in apisix.yaml in "${{}}" format
   5. Get the error, in this case im using openid-connect plugin
   
   ### Environment
   
   - APISIX version (run `apisix version`): image: apache/apisix:3.14.1-debian
   - Operating system (run `uname -a`): fedora 43 workstation
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): 
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`): standalone mode
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to