Skip to content

fix: Ensure URL and Auth Token come from same source#3382

Open
szokeasaurusrex wants to merge 1 commit into
szokeasaurusrex/package-lock-v2from
szokeasaurusrex/v2-backport-auth-source
Open

fix: Ensure URL and Auth Token come from same source#3382
szokeasaurusrex wants to merge 1 commit into
szokeasaurusrex/package-lock-v2from
szokeasaurusrex/v2-backport-auth-source

Conversation

@szokeasaurusrex

Copy link
Copy Markdown
Member

Backport of #3378 to v2

@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/v2-backport-auth-source branch from b11a883 to cf396ff Compare July 24, 2026 08:28
@szokeasaurusrex
szokeasaurusrex changed the base branch from v2 to szokeasaurusrex/package-lock-v2 July 24, 2026 08:28
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/v2-backport-auth-source branch from cf396ff to 03dd68f Compare July 24, 2026 08:30
@szokeasaurusrex
szokeasaurusrex marked this pull request as ready for review July 24, 2026 08:30
@szokeasaurusrex
szokeasaurusrex requested review from a team as code owners July 24, 2026 08:30
Comment thread src/config.rs

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 03dd68f. Configure here.

Comment thread src/config.rs
Some(DiscardedAuthUrlValue::Auth) => {
base.delete_from(Some("auth"), "token");
base.delete_from(Some("auth"), "api_key");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Login skips token overwrite warning

Low Severity

merge_config_source deletes inherited auth from the in-memory INI when a higher-priority file provides only a URL. login then uses get_persisted_auth, so an on-disk token in the save target can be overwritten without the org-mismatch warning. Runtime discards correctly leave the INI alone; file merges do not.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 03dd68f. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This seems like a pretty rare edge case; I think it is probably not worth fixing here, but we can reconsider

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