Skip to content

Commit

Permalink
fix(xo-server/api): private data in api call
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-m-dev committed Sep 27, 2024
1 parent 558ea84 commit bef77bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/xo-server/src/xo-mixins/api.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,11 @@ export default class Api {

const resolvedParams = await resolveParams.call(app, method, params)

// data.params contains obfuscated params
let result = await (name in NO_LOG_METHODS
? method.call(app, resolvedParams)
: app.tasks
.create({ name: 'API call: ' + name, method: name, params, type: 'api.call' }, { clearLogOnSuccess: true })
.create({ name: 'API call: ' + name, method: name, params: data.params, type: 'api.call' }, { clearLogOnSuccess: true })
.run(() => method.call(app, resolvedParams)))

// If nothing was returned, consider this operation a success
Expand Down

0 comments on commit bef77bf

Please sign in to comment.