Summary: With AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=false, GET /instance/fetchInstances still returns the instance token field. Only apikey/hash are masked.
Environment: Evolution API v2.3.7, env AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=false.
Endpoint: GET /instance/fetchInstances
Expected behavior: When the flag is false, sensitive authentication material (apikey, hash, token) should be omitted or masked from the response.
Actual behavior: The response still contains the full token (a 36-char UUID) for each instance. Verified live on v2.3.7 with the flag set to false: { hasToken: true, tokenLen: 36, hasApiToken: false, hasHash: false, hasApikey: false } — hash and apikey are suppressed, but token is not.
Repro steps:
- Start the API with
AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=false.
GET /instance/fetchInstances with the global apikey header.
- Inspect the JSON: each instance still includes a
token field with the full instance token.
Impact: Instance tokens (which grant session-level access) are exposed even when the operator explicitly disables exposure in fetchInstances.
Summary: With
AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=false,GET /instance/fetchInstancesstill returns the instancetokenfield. Onlyapikey/hashare masked.Environment: Evolution API v2.3.7, env
AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=false.Endpoint:
GET /instance/fetchInstancesExpected behavior: When the flag is
false, sensitive authentication material (apikey,hash,token) should be omitted or masked from the response.Actual behavior: The response still contains the full
token(a 36-char UUID) for each instance. Verified live on v2.3.7 with the flag set tofalse:{ hasToken: true, tokenLen: 36, hasApiToken: false, hasHash: false, hasApikey: false }—hashandapikeyare suppressed, buttokenis not.Repro steps:
AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=false.GET /instance/fetchInstanceswith the globalapikeyheader.tokenfield with the full instance token.Impact: Instance tokens (which grant session-level access) are exposed even when the operator explicitly disables exposure in fetchInstances.