ElkArte Community

Elk Development => Bug Reports => Topic started by: meetdilip on March 14, 2015, 12:27:05 pm

Title: Broken URL
Post by: meetdilip on March 14, 2015, 12:27:05 pm
Just happen to use " Forgot Password " option and I got a reset URL half broken. A decent part (at the end ) was not hyperlink at all. I had to copy paste it in browser and clicking would have not helped the cause. I see that similar URL issue is posted in Ultimate Menu discussion thread by @Jorin . Please look into it.
Title: Re: Broken URL
Post by: radu81 on March 14, 2015, 12:44:05 pm
What email client do you use? Do you have outlook or similar installed, or just by web?
If I remember well I had some problems in the past with SMF and links with a hotmail account via web
Title: Re: Broken URL
Post by: meetdilip on March 14, 2015, 12:46:47 pm
I used the web interface. Received it in the junk folder as well ( just in case that could be of any help).
Title: Re: Broken URL
Post by: Spuds on March 14, 2015, 01:11:53 pm
What character did it break it on or was it just a very long link that wrapped around?

I've read that wrapping plain text links in "<" and ">" helps prevent some email clients from mangling them, no idea how effective that is.
Title: Re: Broken URL
Post by: meetdilip on March 14, 2015, 01:31:06 pm
Broke at ;

Replicating the link I got

http://www.elkarte.net/community/index.php?action=reminder (http://www.rediffmail.com/cgi-bin/red.cgi?red=http%3A%2F%2Fwww%2Eelkarte%2Enet%2Fcommunity%2Findex%2Ephp%3Faction%3Dreminder&rediffng=0&rogue=63ad9ea942f672cb45467350bcdbf2aca8e1ee23);sa=setpassword;u=162;code=7f37743ed1
Title: Re: Broken URL
Post by: Spuds on March 14, 2015, 01:46:49 pm
Interesting ... so not a wrapping issue as it broke it as the 59th position ...

I've added the <> wrap to the link on the site, I've read mixed reviews if that helps or not, seems to vary.  Anyway, if you are willing to reset your password again to give it a test that would be great !
Title: Re: Broken URL
Post by: meetdilip on March 15, 2015, 07:02:30 am
This is what I got

<
http://www.elkarte.net/community/index.php?action=reminder (http://www.rediffmail.com/cgi-bin/red.cgi?red=http%3A%2F%2Fwww%2Eelkarte%2Enet%2Fcommunity%2Findex%2Ephp%3Faction%3Dreminder&rediffng=0&rogue=63ad9ea942f672cb45467350bcdbf2aca8e1ee23);sa=setpassword;u=162;code=50521f3082>
Title: Re: Broken URL
Post by: Spuds on March 15, 2015, 09:49:56 am
My only other thought would be to replace those ';' with '&' and see if that would work.  Obvisly the <> stuff did not work and I'm not surprised (that seems to help mac mailers).  But both attempts broke the link at the ; ... so I wonder if using a & instead would prevent that.
Title: Re: Broken URL
Post by: emanuele on March 15, 2015, 10:08:22 am
I tried with one of my accounts and gmail works fine.

It may be one of those peculiar email services that likes to mess with stuff... :-\
What provider do you use meetdilip?
Title: Re: Broken URL
Post by: radu81 on March 15, 2015, 10:25:07 am
I noticed that on Hotmail :if an email (in my case a new registration) reaches the spam folder the link to view the profile is broken. If I mark the mail as safe it gets to inbox and the link is working fine.
Do you use Hotmail
@meetdilip?
Title: Re: Broken URL
Post by: meetdilip on March 15, 2015, 10:40:32 am
@radu81

Rediffmail.
Title: Re: Broken URL
Post by: Spuds on March 15, 2015, 10:54:28 am
For kicks I changed it to use & instead of ; for the separation ... so anyone willing to give it a try please do ... Just a curiosity why its breaking the line.
Title: Re: Broken URL
Post by: emanuele on March 15, 2015, 11:37:18 am
meh, I tried to create an account, but the provider asks for a mobile phone number, that's slightly more than I'm willing to provide in order to register online accounts. :-\
Title: Re: Broken URL
Post by: meetdilip on March 15, 2015, 12:54:42 pm
Quote from: emanuele – meh, I tried to create an account, but the provider asks for a mobile phone number, that's slightly more than I'm willing to provide in order to register online accounts. :-\

Even Gmail does :P
Title: Re: Broken URL
Post by: emanuele on March 15, 2015, 01:14:10 pm
That's why I do not register new gmail accounts. :P
Title: Re: Broken URL
Post by: meetdilip on March 15, 2015, 07:55:30 pm
:P
Title: Broken links in email
Post by: meetdilip on July 13, 2015, 06:10:06 am
http://www.elkarte.net/community/index.php?action=reminder;sa=setpassword;u=162;code=71dcc5e***

The url breaks r or reminder. . From ; onwards, there is not extension of hyperlink in the password retrieval url. Please check.
Title: Re: Broken links in email
Post by: emanuele on July 18, 2015, 04:33:22 am
Emails are sent in markdown.
According to the email specification:
ftp://ftp.rfc-editor.org/in-notes/rfc3986.txt
long URLs should be delimited by preference with angle brackets:
Code: [Select]
<ftp://ftp.rfc-editor.org/in-notes/rfc3986.txt>
the issue could be that email clients do not really understand markdown, especially for joining back pieces of URLs.

I wonder if at some point we could start sending (at least some) emails in html (with an option to have those in plain text :P), just because it would be easier to deal with and, even though I find them annoying, nowadays it is probably kind of expected to have fancy emails.
Title: Re: Broken links in email
Post by: Spuds on July 18, 2015, 06:50:03 am
Quote   In practice, URIs are delimited in a variety of ways, but usually
   within double-quotes "http://example.com/", angle brackets
   <http://example.com/>, or just by using whitespace:
Title: Re: Broken links in email
Post by: meetdilip on July 18, 2015, 10:37:49 pm
I accessed my email using browser.  I have seen some websites give password reset code and then the reset link below. People can either enter reset code or use reset link. In this case a reset code + password reset page link would be great ( in my opinion ).
Title: Re: Broken links in email
Post by: emanuele on July 19, 2015, 03:52:59 am
hmm... Wait.

This kind of emails I think are not even processed in markdown, only body messages of the notification emails are.
This reminds me of some providers that "for fun" url_encode all the urls breaking them at will.

What provider are you using?
Title: Re: Broken links in email
Post by: emanuele on July 19, 2015, 12:03:17 pm
And, BTW,this is a duplicate of: http://www.elkarte.net/community/index.php?topic=2534.0
Title: Re: Broken links in email
Post by: radu81 on July 19, 2015, 05:54:51 pm
As I  said in the other topic I get broken links on Hotmail ONLY if the email is marked as spam
Title: Re: Broken links in email
Post by: emanuele on July 19, 2015, 06:30:48 pm
And if you tell hotmail that is not spam, did the link get back together or does it remain broken?
Title: Re: Broken links in email
Post by: radu81 on July 20, 2015, 06:10:31 am
Yes, once marked as clean the links are working
Title: Re: Broken links in email
Post by: meetdilip on July 21, 2015, 10:55:59 pm
As we discussed before it is a local provider called Rediffmail. The point is, emails ( especially password recovery ) are having broken links with more than one email providers. And it needs to be addressed.
Title: Re: Broken links in email
Post by: Joshua Dickerson on July 22, 2015, 02:17:00 am
Hmm... can we check if using & instead of ; as the delimiter works?
Title: Re: Broken links in email
Post by: emanuele on July 22, 2015, 03:40:54 am
Quote from: meetdilip – As we discussed before it is a local provider called Rediffmail. The point is, emails ( especially password recovery ) are having broken links with more than one email providers. And it needs to be addressed.
As we discussed before, I can't test this provider because it asks a phone number, and I'm not going to put my phone on the internet (no, not even google has it), if you can point to an email provider with the same issue that doesn't ask for my phone number I can test, otherwise... thanks for volunteering in testing that one. ;D
Try with the following code, in Mail.subs.php, find:
Code: (find) [Select]
	foreach ($replacements as $f => $r)
{
$find[] = '{' . $f . '}';
$replace[] = $r;
}
and replace it with:
Code: [Select]
	foreach ($replacements as $f => $r)
{
$find[] = '{' . $f . '}';
if (strpos($f, 'LINK') !== false || strpos($f, 'URL') !== false)
$r = str_replace(';', '&', $r);
$replace[] = $r;
}
Let me know if it breaks again. ;)

Quote from: meetdilip – I have seen some websites give password reset code and then the reset link below. People can either enter reset code or use reset link. In this case a reset code + password reset page link would be great ( in my opinion ).
Most likely this would break the same way because the url would be:
Code: [Select]
http://www.elkarte.net/community/index.php?action=reminder;sa=setpassword;u=162
so (even though it should really be present) it would be useless.

Spoiler (click to show/hide)
Title: Re: Broken URL
Post by: meetdilip on July 24, 2015, 02:06:21 am
Will volunteer. A bit occupied with RL. :)