Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nafraf
Copy link
Collaborator

@nafraf nafraf commented Aug 13, 2025

Describe the changes in the pull request

A clear and concise description of what the PR is solving, including:

  1. Current:
    In Redis, the "master" client (such as replication) may not have an associated user, and RedisModule_GetCurrentUserName() will return NULL in such cases.
    Redisearch was not validating the previous case.
  2. Change:
    Allow access in ACLUserMayAccessIndex when no user is associated
    Similar approach was used by RedisTimeSeries in CheckKeyIsAllowedByAcls
  3. Outcome:

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

@nafraf nafraf marked this pull request as ready for review August 13, 2025 22:13
@nafraf nafraf requested review from oshadmi and raz-mon August 13, 2025 22:15
@codecov
Copy link

codecov bot commented Aug 13, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.45%. Comparing base (f3e27a1) to head (99a8139).
⚠️ Report is 21 commits behind head on master.

Files with missing lines Patch % Lines
src/module.c 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6651      +/-   ##
==========================================
- Coverage   87.48%   87.45%   -0.03%     
==========================================
  Files         282      282              
  Lines       44844    44840       -4     
  Branches     7747     7751       +4     
==========================================
- Hits        39231    39217      -14     
- Misses       5495     5503       +8     
- Partials      118      120       +2     
Flag Coverage Δ
flow 84.49% <33.33%> (-0.16%) ⬇️
unit 49.26% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

raz-mon
raz-mon previously approved these changes Aug 14, 2025
@nafraf nafraf requested a review from GuyAv46 August 18, 2025 05:24
@raz-mon
Copy link
Collaborator

raz-mon commented Aug 25, 2025

Reproduced by sending a write command on Enterprise on an existing index:

FT.CREATE idx SCHEMA t TEXT
FT.ALTER idx SCHEMA ADD t2 TEXT

@oshadmi This will be tested once we run our flow-tests on RE, something that is long due and planned for the short term AFAIK. For now tested manually.

@raz-mon raz-mon enabled auto-merge August 25, 2025 18:12
@raz-mon raz-mon disabled auto-merge August 25, 2025 18:12
@raz-mon raz-mon added this pull request to the merge queue Aug 26, 2025
Merged via the queue into master with commit 3ec7115 Aug 26, 2025
49 of 50 checks passed
@raz-mon raz-mon deleted the nafraf_mod-10748 branch August 26, 2025 16:27
redisearch-backport-pull-request bot pushed a commit that referenced this pull request Aug 26, 2025
* Allow access in ACLUserMayAccessIndex when no user is associated

* Touchup

---------

Co-authored-by: Raz Monsonego <[email protected]>
(cherry picked from commit 3ec7115)
@redisearch-backport-pull-request
Copy link
Contributor

Successfully created backport PR for 8.2:

github-merge-queue bot pushed a commit that referenced this pull request Aug 26, 2025
MOD-10748: Fix ACLUserMayAccessIndex (#6651)

* Allow access in ACLUserMayAccessIndex when no user is associated

* Touchup

---------


(cherry picked from commit 3ec7115)

Co-authored-by: nafraf <[email protected]>
Co-authored-by: Raz Monsonego <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants