Bug 414464 - wireguard: default name not allowed, no ipv6 in "allowed ip" text box, validate input before user clicks ok
Summary: wireguard: default name not allowed, no ipv6 in "allowed ip" text box, valida...
Status: RESOLVED DUPLICATE of bug 479179
Alias: None
Product: plasma-nm
Classification: Plasma
Component: editor (show other bugs)
Version: 5.17.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-24 15:21 UTC by Daniel
Modified: 2024-03-27 02:07 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2019-11-24 15:21:44 UTC
SUMMARY
  - default name contains spaces and thus results in cancellation when adding new VPN entry. (if name not changed)

  - entering a ipv6 ip in allowed ip text box leads to cancellation of editing the entry when trying to apply it, but ipv6 ip is a legal option in wireguard (for example 0.0.0.0, ::/0)

  - don't cancel the entry when illegal inputs are made, but rather block user from applying the change.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.17.3
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.2
Comment 1 Bruce Anderson 2019-12-18 08:21:55 UTC
(In reply to daniel-other+kdebug from comment #0)
> SUMMARY
>   - default name contains spaces and thus results in cancellation when
> adding new VPN entry. (if name not changed)

The default name will be changed to not include spaces.

> 
>   - entering a ipv6 ip in allowed ip text box leads to cancellation of
> editing the entry when trying to apply it, but ipv6 ip is a legal option in
> wireguard (for example 0.0.0.0, ::/0)

I am unable to reproduce this problem, in fact I have used IPv6 in the Allowed IPs in all the tests I have done.  I notice that in the example given, there is not a CIDR mask given on the IPv4 part though. It should actually be: "0.0.0.0/0, ::/0" so this might be the problem.

What is showing when you enter this string in the Allowed IPs field? That field has an integrity check on it which should set the background color to an error color (on mine it shows red but that is theme dependent) and the OK button should be grayed out. 

So when you create a new WireGuard connection, you should see several fields (Private Key in the initial window and Public Key and Allowed IPs in the Peers window) should be highlighted with the error background and Save (or OK on the Peer window) should be grayed out and as you enter a correct value, the error background should go away and when all checked fields are good, the Save button should become active. Is this what you are seeing?

> 
>   - don't cancel the entry when illegal inputs are made, but rather block
> user from applying the change.
> 

Unfortunately the software architecture of plasma-nm with WireGuard being added after the rest of the interface was implemented, made this a whole lot easier for the data fields on the WireGuard Interface tab than the other tabs so that was what got implemented. A solution for the other entries (including the connection name field) is being explored.

> SOFTWARE/OS VERSIONS
> Linux/KDE Plasma: Arch Linux
> KDE Plasma Version: 5.17.3
> KDE Frameworks Version: 5.64.0
> Qt Version: 5.13.2
Comment 2 Daniel 2019-12-19 18:56:11 UTC
(In reply to Bruce Anderson from comment #1)
> (In reply to daniel-other+kdebug from comment #0)
> > SUMMARY
> >   - default name contains spaces and thus results in cancellation when
> > adding new VPN entry. (if name not changed)
> 
> The default name will be changed to not include spaces.

good, thank you.

 
> > 
> >   - entering a ipv6 ip in allowed ip text box leads to cancellation of
> > editing the entry when trying to apply it, but ipv6 ip is a legal option in
> > wireguard (for example 0.0.0.0, ::/0)
> 
> I am unable to reproduce this problem, in fact I have used IPv6 in the
> Allowed IPs in all the tests I have done.  I notice that in the example
> given, there is not a CIDR mask given on the IPv4 part though. It should
> actually be: "0.0.0.0/0, ::/0" so this might be the problem.
> 
> What is showing when you enter this string in the Allowed IPs field? That
> field has an integrity check on it which should set the background color to
> an error color (on mine it shows red but that is theme dependent) and the OK
> button should be grayed out. 

Yes, I think I forgot the CIDR mask. However, if I try to add "0.0.0.0/0, ::/0" and then click apply and then ok, a notification comes up with 

wireguard.peers: Eigenschaft konnte nicht festgelegt werden: peer #1 has invalid allowed-ips setting 

which translates roughly to "Setting could not be set".

> 
> So when you create a new WireGuard connection, you should see several fields
> (Private Key in the initial window and Public Key and Allowed IPs in the
> Peers window) should be highlighted with the error background and Save (or
> OK on the Peer window) should be grayed out and as you enter a correct
> value, the error background should go away and when all checked fields are
> good, the Save button should become active. Is this what you are seeing?

yes, I see this when I create a new wg connection.
Comment 3 aTosser 2022-01-22 07:06:08 UTC
> The default name will be changed to not include spaces.

It has been two years... and the default still has a space in it.
Comment 4 aTosser 2022-01-22 07:21:31 UTC
duplicate of 412795
Comment 5 Antti Savolainen 2024-03-27 01:34:13 UTC
I was about to make a new bug report but there already exists one. I'll just copypaste it all here

SUMMARY
Demonstrative video: https://youtu.be/RvEb-IFA-c8
If I create a new wireguard interface with minimal configuration, the setup will error out at the last moment because the default interface name contains invalid characters. I assume the error is referring to the spaces. This is especially infuriating if you've spent the setup setting up all the configurations instead of doing them after the interface is established because now you've got to do it all again.

STEPS TO REPRODUCE
1. Start creating a new wireguard interface
2. Fill out the bare necessities and don't change anything
3. Save

OBSERVED RESULT
The configurator errors out claiming there's an invalid character in the name

EXPECTED RESULT
The name should allow for spaces

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Comment 6 Antti Savolainen 2024-03-27 02:07:02 UTC

*** This bug has been marked as a duplicate of bug 479179 ***