Skip to content

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

Open
stonebuzz wants to merge 3 commits into
mainfrom
some_fix
Open

Fix(core): validate entity access in consumeVoucher before recording#247
stonebuzz wants to merge 3 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-BAugust 28, 2026 07:20
@stonebuzzstonebuzz self-assigned this Aug 28, 2026

@Rom1-BRom1-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 threadinc/ticket.class.php Outdated
@stonebuzz
stonebuzz requested a review from Rom1-BAugust 28, 2026 12:30

@Rom1-BRom1-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

Sign up for freeto 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

@stonebuzz@Rom1-B