Settings validation gaps: max indexed files becomes 1, openaiBaseUrl unchecked, MCP values untyped
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 57/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- desktop
Research direction
Start with src/main/settings.ts at the cited validation, update, and persistence paths, then inspect src/renderer/src/views/dialogs.ts:506 for the empty-field conversion. Run the settings-related tests and check validation for each listed input plus the failed-write case. Done means invalid values are rejected or defaulted as specified and a failed write leaves in-memory secrets unchanged.
Written by the indexing model from the issue text.
Description
Found in the 2026-10-07 code review; the first item is confirmed with a probe.
Problems
- Max indexed files: an empty field in Settings sends
Number('')= 0 (src/renderer/src/views/dialogs.ts:506), andsanitize(src/main/settings.ts:428) turns it intoMath.max(1, 0)= 1 file.NaNpasses the type check and staysNaN. - OpenAI base URL:
openaiBaseUrlis never checked withbaseUrlError, unlikeanthropicBaseUrl(settings.ts:119-122,432). - MCP values:
mcpServerErrordoesn't check thatenvandheadersvalues are strings, soencryptMapcan callencrypt(1). - Write ordering:
updatecallsstoreMcpSecrets(settings.ts:124), which changesthis.mcpSecretsbeforepersist. If the write fails, memory and disk disagree and no change is emitted.
Fix
if (!Number.isFinite(n) || n < 1) result.maxIndexedFiles = DEFAULT_SETTINGS.maxIndexedFiles;- Validate
openaiBaseUrlthe same way asanthropicBaseUrl. - Reject MCP
env/headersvalues that aren't strings. - Compute the next MCP secrets and assign them only after
writeStoredsucceeds, asmigratePlainSecretsalready does.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 2
- Avg merge
- 8h 28m
- Merged PRs (30d)
- 26
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PierrunoYT/patch
-
enhancement priority: low severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PierrunoYT/patch#305 ·
Maintainers usually reply within 1 day
-
security: isAppPageUrl checks devRendererUrl with startsWith instead of comparing parsed URL originsOpenpriority: low security severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PierrunoYT/patch#300 ·
Maintainers usually reply within 1 day
-
Claude Code chats: tool calls made inside Claude Code subagents leave cards that end as "(stopped)"Openbug priority: low severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
PierrunoYT/patch#289 ·
Maintainers usually reply within 1 day
-
bug priority: medium severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PierrunoYT/patch#285 ·
Maintainers usually reply within 1 day
-
priority: medium security severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
PierrunoYT/patch#283 ·
Maintainers usually reply within 1 day
All issues in PierrunoYT/patch
Similar issues
-
documentation good first issue
Difficulty 2/5 Half a day Newbie friendliness 72/100
sujithputta02/Esapay#13 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ehmpathy/rhachet-roles-bhuild#468 ·
Maintainers usually reply within 1 day
-
Share dialog: the address book's contact count reads "1 contacts" (no singular form in any language)Possibly taken @chibenwa claimed this today. Openai-driven-qa bug claude Cosmetic
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
linagora/twake-contacts-frontend#271 · 1 comment ·
Maintainers usually reply within 1 day
-
factory-active task-identify-harness-labels-done task-identify-issue-type-done
Difficulty 1/5 Under an hour Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Koenkk/zigbee2mqtt#33402 ·
Maintainers usually reply within 1 day