Skip to content

fix(ipsec): reject curly braces in pre-shared keys#763

Merged
gsanchietti merged 1 commit into
mainfrom
issue1631
May 14, 2026
Merged

fix(ipsec): reject curly braces in pre-shared keys#763
gsanchietti merged 1 commit into
mainfrom
issue1631

Conversation

@gsanchietti
Copy link
Copy Markdown
Member

Summary

Reject unsupported curly brace characters in imported IPsec pre-shared keys.
Add a tooltip next to the pre-shared key field so users know that { and }
are not accepted.
Cover the new validator with a focused unit test.

Related issue

NethServer/nethsecurity#1631

How to test

  1. Open the IPsec tunnel drawer and choose a custom pre-shared key.
  2. Enter a key containing { or } and verify the form shows a validation error.
  3. Hover the tooltip next to the pre-shared key field and verify it explains
    that { and } are not accepted.
  4. Enter a key without curly braces and verify the form can proceed.

Dependencies

None

@gsanchietti gsanchietti self-assigned this May 13, 2026
@gsanchietti gsanchietti changed the title Reject unsupported curly braces in IPsec PSKs fix(ipsec): reject curly braces in pre-shared keys May 13, 2026
Comment thread src/i18n/en.json Outdated
Comment thread src/i18n/it.json Outdated
Comment thread src/i18n/ta.json
Comment thread src/components/standalone/ipsec_tunnel/CreateOrEditTunnelDrawer.vue Outdated
Comment thread src/i18n/ta.json Outdated
Copy link
Copy Markdown
Collaborator

@Tbaile Tbaile left a comment

Choose a reason for hiding this comment

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

Aside from the escaping of the lang files and the ta lang changed (i have no clue on what to verify if it's actually legit), looking fine

gsanchietti added a commit that referenced this pull request May 14, 2026
- Add single quotes around escaped curly braces in tooltips for en and it translations
- Refactor component to use NeTextInput label and tooltip props instead of separate components
- Improve code readability and align with component best practices

Fixes review comments on PR #763
@gsanchietti gsanchietti force-pushed the issue1631 branch 2 times, most recently from dfbabf6 to 6187c90 Compare May 14, 2026 09:57
Reject unsupported curly brace characters in imported IPsec
pre-shared keys and show a tooltip next to the field so users know
which characters are not accepted.

Add unit coverage for the new validation helper so this validation
rule stays protected.

Assisted-by: Copilot:gpt-5.4
@gsanchietti gsanchietti merged commit 37420eb into main May 14, 2026
5 checks passed
@gsanchietti gsanchietti deleted the issue1631 branch May 14, 2026 10:21
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.

4 participants