Bug 44117 - Broken IPv6 links and not all server IP addresses are written to portal entries
Broken IPv6 links and not all server IP addresses are written to portal entries
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Portal
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2-2-errata
Assigned To: Alexander Kläser
Johannes Keiser
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-28 19:10 CEST by Janek Walkenhorst
Modified: 2017-09-06 17:10 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.137
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): IPv6, Usability
Max CVSS v3 score:
klaeser: Patch_Available+


Attachments
port4l (163.67 KB, image/png)
2017-03-28 19:17 CEST, Janek Walkenhorst
Details
Proposed patch (1.50 KB, patch)
2017-08-09 16:24 CEST, Alexander Kläser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Janek Walkenhorst univentionstaff 2017-03-28 19:10:56 CEST
From portal.json:
"links": [
        "https://2001:…:ff12::a/univention/portal/", 
        "http://2001:…:ff12::a/univention/portal/", 
        "http://ucs-8844.orga.intranet/univention/portal/", 
        "https://ucs-8844.orga.intranet/univention/portal/"
      ], 
("…" added by me)
This leads to four buttons. Two of which do nothing, because the IPv6 address is not properly encoded into the URL.
Comment 2 Janek Walkenhorst univentionstaff 2017-03-28 19:17:33 CEST
Created attachment 8674 [details]
port4l
Comment 3 Alexander Kläser univentionstaff 2017-08-09 16:24:31 CEST
Bug 44371 addressed also the issue of multiple links being shown.

The wrong IPv6 URIs probably still persist:
> http://2001:…:ff12::a/foo
should be:
> http://[2001:…:ff12::a]/foo
in order no to confuse the IPv6 address with ports.

This is a problem in create_portal_entries.py, line 70:
> return '%s://%s%s%s' % (self.protocol, self.host, port, self.path)
Comment 4 Alexander Kläser univentionstaff 2017-08-09 16:24:55 CEST
Created attachment 9109 [details]
Proposed patch
Comment 5 Alexander Kläser univentionstaff 2017-08-09 16:27:38 CEST
(In reply to Alexander Kläser from comment #4)
> Created attachment 9109 [details]
> Proposed patch

This would create correct IPv6 entries and it would write all addresses into the link entry. The following script snippet can be used to update all portal entries:

https://help.univention.com/t/4-2-domain-join-script-fails/5403/6
Comment 6 Alexander Kläser univentionstaff 2017-08-09 16:28:45 CEST
(In reply to Alexander Kläser from comment #5)
> This would create correct IPv6 entries and it would write all addresses into
> the link entry. [...]

Multiple addresses are properly handled via Bug 44371.
Comment 7 Alexander Kläser univentionstaff 2017-08-11 15:17:39 CEST
I adjusted the final patch again to properly use the API provided by the classes.

univention-appcenter (6.0.9-2):
r82068 | Bug #44117: Fix IPv6 URI format + add all IP addresses to portal entry

univention-appcenter.yaml:
r82069 | Bug #44117: added yaml file
Comment 8 Johannes Keiser univentionstaff 2017-08-11 19:31:19 CEST
master40.mydomain.intranet
IP addresses

10.200.28.40
10.200.28.45
2001:470:71e6:28::2
2001:470:71e6:28::3
-------------------

Installing new app before the patch:
"links": [
    "https://10.200.28.40/dudle",
    "http://10.200.28.40/dudle",
    "https://master40.mydomain.intranet/dudle",
    "https://2001:470:71e6:28::2/dudle",
    "http://master40.mydomain.intranet/dudle",
    "http://2001:470:71e6:28::2/dudle"
],

OK Installing new app after the patch:
"links": [
    "https://10.200.28.45/etherpad/",
    "http://[2001:470:71e6:28::2]/etherpad/",
    "https://master40.mydomain.intranet/etherpad/",
    "http://master40.mydomain.intranet/etherpad/",
    "http://10.200.28.45/etherpad/",
    "http://[2001:470:71e6:28::3]/etherpad/",
    "https://[2001:470:71e6:28::3]/etherpad/",
    "https://[2001:470:71e6:28::2]/etherpad/",
    "http://10.200.28.40/etherpad/",
    "https://10.200.28.40/etherpad/"
],

(In reply to Alexander Kläser from comment #5)
> (In reply to Alexander Kläser from comment #4)
> > Created attachment 9109 [details]
> > Proposed patch
> 
> This would create correct IPv6 entries and it would write all addresses into
> the link entry. The following script snippet can be used to update all
> portal entries:
> 
> https://help.univention.com/t/4-2-domain-join-script-fails/5403/6

The mentioned script did not do anything for me but changing a
ucs/web/overview/entries/* ucr variables did update portal.json

old link entries after update:
"links": [
    "https://2001:470:71e6:28::2/dudle",
    "http://2001:470:71e6:28::2/dudle",
    "https://10.200.28.45/dudle",
    "https://[2001:470:71e6:28::2]/dudle",
    "http://10.200.28.45/dudle",
    "https://[2001:470:71e6:28::3]/dudle",
    "http://[2001:470:71e6:28::3]/dudle",
    "http://[2001:470:71e6:28::2]/dudle",
    "https://10.200.28.40/dudle",
    "http://10.200.28.40/dudle",
    "https://master40.mydomain.intranet/dudle",
    "http://master40.mydomain.intranet/dudle"
],

The old ipv6 addresses did not get removed but this is a general problem with
changing a ucs/web/overview/entries/* ucr variable. (e.g. changing ucs/web/overview/entries/*/link) keeps the old link


YAML: OK (r 82082 typo)
-> verified
Comment 9 Arvid Requate univentionstaff 2017-09-06 17:10:11 CEST
<http://errata.software-univention.de/ucs/4.2/158.html>