Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Last Character of an email not being linked

Hi

One canned message has an email such like address@domain.click (yes, the domain is a .click one) and after I submit the message, the link doesn't show the last character, the k. It only creates the link to address@domain.clic exactly like this: address@domain.click

Is this a bug in the system?

Thanks

Comments

  • Looks like a bug to me.
    Also I confirm that this happens in my 1.10 test site also.
  • edited August 21
    Okay so it's the way the formatting regex handles email domain extensions. It will only match between two and four characters of the domain extension. For example:
    - .name will match because it is between 2 and 4 characters
    - .click will not match because it is 5 characters

    If you want to allow 5 characters in the domain extension then you can go to include/class.format.php on line 429 and change:
    +[a-z]{2,4}`
    to
    +[a-z]{2,5}`

    Save your changes, clear all cache and test again. You should now have all the text in the link. :)
  • Hey, great finding.

    I will manually change the file to allow more domain characters. In 2017 it makes sense that the domain characters go to about 10 with the new TLDs out there.

    Will this be fixed in a new version in the future? 

    Thank you.
  • I would argue that it should match the RFC 1034 which specifies the maximum TLD length as 63 octets.

    sources:
  • In 2017 it makes sense that the domain characters go to about 10 with the new TLDs out there.
    Will this be fixed in a new version in the future? 

    Why certainly, I'll make the pull request now. Thanks for the report btw. :)
  • https://github.com/osTicket/osTicket/pull/3931
    Here is the pull request! I allowed up to 63 chars because as @ntozier said, RFC states the labels are 63 octets or less! :)
  • And if I may ask did you modifies your email template? and yes then you shouldn't change the CODE you find in the contest
  • @KingBright of course he should change the code to fix the bug.
Sign In or Register to comment.