Skip to content

Secure webhooks, randomness and transaction logging - #18

Merged
papac merged 1 commit into
mainfrom
code-formatting
Oct 13, 2026
Merged

papac merged 1 commit into
mainfrom
code-formatting

Conversation

@papac

@papac papac commented Oct 13, 2026

Copy link
Copy Markdown
Member
  • WebhookHandler: require a signature (an unsigned webhook was trusted and thus a forgeable "payment success") and verify it over the raw request body rather than a re-encoded array; comparison stays hash_equals.
  • Common\Utils and MonoGateway: generate transaction references and UUIDs with a CSPRNG (random_int/random_bytes) instead of rand/mt_rand/uniqid.
  • TransactionLogger: redact secret-bearing keys and create the log directory with 0700 permissions.
  • WaveClient: URL-encode the session id in request paths.
  • OrangeTokenGenerator: require HTTPS for the credential endpoint.

- WebhookHandler: require a signature (an unsigned webhook was trusted and
  thus a forgeable "payment success") and verify it over the raw request
  body rather than a re-encoded array; comparison stays hash_equals.
- Common\Utils and MonoGateway: generate transaction references and UUIDs
  with a CSPRNG (random_int/random_bytes) instead of rand/mt_rand/uniqid.
- TransactionLogger: redact secret-bearing keys and create the log
  directory with 0700 permissions.
- WaveClient: URL-encode the session id in request paths.
- OrangeTokenGenerator: require HTTPS for the credential endpoint.
@papac
papac merged commit b681237 into main Oct 13, 2026
2 checks passed
@papac
papac deleted the code-formatting branch October 13, 2026 09:28
@papac
papac restored the code-formatting branch October 13, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant