Skip to content

Conversation

@Nepomuk5665
Copy link
Contributor

Summary

Fix a copy-paste bug in HttpFilesSource._SetDefaults() where netgroup_url incorrectly defaults to GROUP_URL instead of NETGROUP_URL.

The Bug

In nss_cache/sources/httpsource.py line 94, the default value for netgroup_url was set to self.GROUP_URL:

if "netgroup_url" not in configuration:
    configuration["netgroup_url"] = self.GROUP_URL  # Wrong!

This is clearly a copy-paste error from the group_url handling on line 91-92 directly above it.

The Fix

Changed to use the correct constant self.NETGROUP_URL:

if "netgroup_url" not in configuration:
    configuration["netgroup_url"] = self.NETGROUP_URL  # Correct

Impact

Without this fix, any netgroup lookups using the HTTP source that don't explicitly configure netgroup_url would incorrectly use the group URL by default, leading to failed or incorrect netgroup resolution.

@DifanZhang DifanZhang enabled auto-merge (rebase) January 26, 2026 01:44
@DifanZhang DifanZhang disabled auto-merge January 26, 2026 01:45
@DifanZhang DifanZhang self-requested a review January 26, 2026 01:46
@github-actions

This comment has been minimized.

Copy link
Contributor

@DifanZhang DifanZhang left a comment

Choose a reason for hiding this comment

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

LGTM

@DifanZhang DifanZhang enabled auto-merge January 26, 2026 01:47
@DifanZhang DifanZhang merged commit 1db1196 into google:main Jan 26, 2026
9 checks passed
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

Unit Test Results

    1 files      1 suites   11s ⏱️
306 tests 300 ✔️ 6 💤 0 ❌

Results for commit 1db1196.

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