Bug 356587 - Connecting to openconnect vpn fails
Summary: Connecting to openconnect vpn fails
Status: RESOLVED FIXED
Alias: None
Product: plasma-nm
Classification: Plasma
Component: applet (show other bugs)
Version: 5.5.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-13 09:51 UTC by Simon Munton
Modified: 2016-06-15 13:16 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Simple fix, use lastIndex - 1 (669 bytes, patch)
2015-12-13 09:52 UTC, Simon Munton
Details
Better fix, store form index in private data (2.33 KB, patch)
2015-12-13 09:54 UTC, Simon Munton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Munton 2015-12-13 09:51:15 UTC
Having upgraded from 5.4.3 to 5.5.0, previously working openconnect vpn connections now fail to connect. A message is diaplayed about required secrets not being provided/

This bug is due to the change in commit 5dad876a2a
That commit removed a 'show password' checkbox from the login form, but that change was not accounted for in the formLoginClicked() function. That function retrieves the layout contaning the password, username etc by calling:
d->ui.loginBoxLayout->itemAt(lastIndex - 2)->layout();
As the checkbox has been removed, it should be:
d->ui.loginBoxLayout->itemAt(lastIndex - 1)->layout();

A better solution would be to store the login form index in the private data when the layout is added.





Reproducible: Always

Steps to Reproduce:
1. Try to connect to an openconnect vpn


Actual Results:  
Fails to connect to vpn

Expected Results:  
Successful connection to vpn
Comment 1 Simon Munton 2015-12-13 09:52:40 UTC
Created attachment 96030 [details]
Simple fix, use lastIndex - 1
Comment 2 Simon Munton 2015-12-13 09:54:04 UTC
Created attachment 96031 [details]
Better fix, store form index in private data

also remove now unused passwordModeToggled() function
Comment 3 Jan Grulich 2015-12-14 09:18:12 UTC
Git commit c004d3563a08ed9519be20c98861999ea72faa42 by Jan Grulich.
Committed on 14/12/2015 at 09:18.
Pushed by grulich into branch 'master'.

Fix openconnect dialog

Previous patch removing "Show passwords" checkbox changed layout order and
we forgot to address that.

Patch from Simon Munton
Related: bug 356622

M  +3    -19   vpn/openconnect/openconnectauth.cpp
M  +0    -1    vpn/openconnect/openconnectauth.h

http://commits.kde.org/plasma-nm/c004d3563a08ed9519be20c98861999ea72faa42
Comment 4 Jan Grulich 2015-12-14 09:18:49 UTC
Git commit 28c4b2e1b868427201cecb6d01cdb45ebfd157a0 by Jan Grulich.
Committed on 14/12/2015 at 09:18.
Pushed by grulich into branch 'Plasma/5.5'.

Fix openconnect dialog

Previous patch removing "Show passwords" checkbox changed layout order and
we forgot to address that.

Patch from Simon Munton
Related: bug 356622

M  +3    -19   vpn/openconnect/openconnectauth.cpp
M  +0    -1    vpn/openconnect/openconnectauth.h

http://commits.kde.org/plasma-nm/28c4b2e1b868427201cecb6d01cdb45ebfd157a0
Comment 5 vadimk 2016-03-30 14:33:53 UTC
Still have the issue in 5.6.1:
NetworkManager[3439]: <error> [1459344215.136589] [/var/tmp/portage/net-misc/networkmanager-1.0.10-r1/work/NetworkManager-1.0.10/src/vpn-manager/nm-vpn-connection.c:1918] plugin_need_secrets_cb(): (XXXXXXXXXXXXXXXXXXXXXXX) final secrets request failed to provide sufficient secrets

Installed:
kde-frameworks/networkmanager-qt-5.20.0
kde-plasma/plasma-nm-5.6.1
net-misc/networkmanager-1.0.10-r1
net-misc/networkmanager-openconnect-1.0.8-r1
net-misc/openconnect-7.06-r2
Comment 6 Jan Grulich 2016-04-05 08:33:52 UTC
*** Bug 360176 has been marked as a duplicate of this bug. ***
Comment 7 Thomas Berger 2016-05-06 08:16:50 UTC
Doesn't work here. (see also https://bugs.gentoo.org/show_bug.cgi?id=578610 )

Any hints how to debug this, so i could provide more information?
Comment 8 Christoph Feck 2016-06-15 12:52:46 UTC
Please report a separate ticket. This one was about the UI layout fix.
Comment 9 vadimk 2016-06-15 13:16:36 UTC
It was done here: Bug 360176. Why was 360176 treated as UI bug?