Skip to content

Fix(core): validate entity access in consumeVoucher before recording - #247

Merged
stonebuzz merged 5 commits into
mainfrom
some_fix
Aug 31, 2026
Merged

Fix(core): validate entity access in consumeVoucher before recording#247
stonebuzz merged 5 commits into
mainfrom
some_fix

Conversation

@stonebuzz

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

validate entity access in consumeVoucher before recording

Screenshots (if appropriate):

@stonebuzz
stonebuzz requested a review from Rom1-B August 28, 2026 07:20
@stonebuzz stonebuzz self-assigned this Aug 28, 2026

@Rom1-B Rom1-B left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a functional test for consumeVoucher() covering the case where the credit's entity is outside the current session's accessible entities, asserting no row gets inserted? This is an access-control fix, worth locking in with a regression test.

Comment thread inc/ticket.class.php Outdated
@stonebuzz
stonebuzz requested a review from Rom1-B August 28, 2026 12:30

@Rom1-B Rom1-B left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve, but some tests would be welcome

@stonebuzz
stonebuzz merged commit 8190f4a into main Aug 31, 2026
3 checks passed
@stonebuzz
stonebuzz deleted the some_fix branch August 31, 2026 13:16
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.

2 participants