Skip to content

fix: logic bug in importConfig function#262

Open
jkennedyvz wants to merge 1 commit intomainfrom
jk/fix-import
Open

fix: logic bug in importConfig function#262
jkennedyvz wants to merge 1 commit intomainfrom
jk/fix-import

Conversation

@jkennedyvz
Copy link
Contributor

The importConfig function had inverted boolean logic that caused ALL configuration keys to be cleared instead of imported.

The condition used OR (||) instead of AND (&&), which meant it was always true for any key:

  • If key == ACCESSKEY: (false || true || true) = true → cleared ✗
  • If key == SECRETKEY: (true || false || true) = true → cleared ✗
  • If key == APIURL: (true || true || false) = true → cleared ✗
  • If key == other: (true || true || true) = true → cleared ✗

This completely broke the import functionality - users could not migrate configurations between machines.

Fix: Changed OR (||) to AND (&&) so the condition is only true for non-credential keys, allowing credentials to be properly imported.

Impact: Users can now successfully import configurations including API keys, secret keys, and API URLs.

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

The importConfig function had inverted boolean logic that caused ALL
configuration keys to be cleared instead of imported.

The condition used OR (||) instead of AND (&&), which meant it was
always true for any key:
- If key == ACCESSKEY: (false || true || true) = true → cleared ✗
- If key == SECRETKEY: (true || false || true) = true → cleared ✗
- If key == APIURL: (true || true || false) = true → cleared ✗
- If key == other: (true || true || true) = true → cleared ✗

This completely broke the import functionality - users could not
migrate configurations between machines.

Fix: Changed OR (||) to AND (&&) so the condition is only true for
non-credential keys, allowing credentials to be properly imported.

Impact: Users can now successfully import configurations including
API keys, secret keys, and API URLs.
@jkennedyvz jkennedyvz requested a review from jrozner as a code owner February 9, 2026 05:58
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