Skip to content

Conversation

Copy link

Copilot AI commented Nov 24, 2025

Addresses feedback from #131: validation for mssfix and tun_mtu was accepting empty/non-numeric input because parseInt(value) < min evaluates to false when parseInt() returns NaN.

Validation logic

  • Add isNaN() check before numeric comparison
  • Store parsed value to avoid redundant parseInt() calls
  • Use explicit radix parameter parseInt(value, 10) throughout

Translation strings

  • Add missing error.tun_mtu_min and error.mssfix_min keys to EN/IT/ES
// Before
if (parseInt(this.mssfix) < 0) {
  this.error.mssfix = this.$t("error.mssfix_min");
  // ...
}

// After
const mssfixValue = parseInt(this.mssfix, 10);
if (isNaN(mssfixValue) || mssfixValue < 0) {
  this.error.mssfix = this.$t("error.mssfix_min");
  // ...
}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copy link
Author

Copilot AI commented Nov 24, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • registry.npmmirror.com
    • Triggering command: /usr/local/bin/node node /usr/local/bin/npm install (dns block)
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update implementation of MTU and MSSFix options Fix NaN handling in mssfix and tun_mtu validation Nov 24, 2025
Copilot AI requested a review from gsanchietti November 24, 2025 10:59
@gsanchietti gsanchietti marked this pull request as ready for review November 24, 2025 11:00
@gsanchietti gsanchietti merged commit 6c54d59 into mtu_option Nov 24, 2025
2 of 3 checks passed
@gsanchietti gsanchietti deleted the copilot/sub-pr-131-yet-again branch November 24, 2025 11:01
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