- Status Waiting on Customer
- Percent Complete
- Task Type Bug Report
- Category Notifications → Email
-
Assigned To
peterdd - Operating System All
- Severity Low
- Priority Very Low
- Reported Version 1.0-rc9
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Opened by Christian Wörstenfeld - 14.03.2020
Last edited by peterdd - 26.03.2020
FS#2596 - Invalid link in notification HTML part of eMail
Hello,
my notification eMails have invalid links.
I use a different port. See below for the partial eMail source text:
DIES IST EINE AUTOMATISCH ERSTELLTE NACHRICHT, BITTE NICHT ANTWORTEN.<br>
… <br>Mehr Informationen k=C3=B6nnen unter=
der folgenden URL abgerufen werden: <br><a href=3D”https://pp.cobru.de“>pp=
.cobru.de</a>:444/bug/index.php?do=3Ddetails&task_id=3D309<br><br>Sie erhal=
ten diese Nachricht, weil Sie in Flyspray Benachrichtigungen aktiviert habe=
…
Debian GNU/Linux 10 (buster)
MySQL 10.3.22
PHP version: 7.3.14-1~deb10u1
Flyspray 1.0-rc9
Steps done to create the problem:
-Use a different Webserver Port
-Enable eMail notifications
-Create or modify an task
Expected behavior:
-Valid link
Experienced behavior:
-Invalid link
BR
Wörsty
The reason seems a failing link detection because an optional port in a url is not recognized by the pattern matching that creates the html a-tag of the HTML part of a notification email. Email readers that prefer displaying the plain text part instead HTML part are not effected.
Could you try replacing the regular expression in includes/class.notify.php (around currently at line 416, see https://github.com/Flyspray/flyspray/blob/master/includes/class.notify.php#L416)
Replace this:
with this:
The resulting regular expression is still not perfect but should handle now optional ports. I fiddled a bit with https://regex101.com/ - really cool project.
I made a change on github. Please test.
https://github.com/Flyspray/flyspray/commit/7a18a1c1055e61f80350478b573012abee96234b