Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=false does not mask instance token

Open
#2,677 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
api, security

Research direction

Locate the GET /instance/fetchInstances handler and the AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES flag handling; first trace how apikey and hash are currently removed. Reproduce with the flag false and verify that token is omitted or masked for every returned instance, while the existing authentication fields remain protected.

Written by the indexing model from the issue text.

Description

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:

  1. Start the API with AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=false.
  2. GET /instance/fetchInstances with the global apikey header.
  3. 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.

Dominant language
TypeScript
Stars
9.6k
Forks
7.3k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from evolution-foundation/evolution-api

All issues in evolution-foundation/evolution-api

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.