Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: b.IT on September 10, 2012, 12:15:55 PM

Title: Activation link (webmail derefferer Problem) FIX
Post by: b.IT on September 10, 2012, 12:15:55 PM
Some webmail providers break the member activation links by replacing ";" with garbage. This is an annoying problem but there's an easy cure, just replace ";" with "&"

Fix:
in sub-members.php (2x) and register.php (1x)

FIND:
'ACTIVATIONLINK' => $scripturl . '?action=activate;u=' . $memberID . ';code=' . $validation_code,
'ACTIVATIONLINKWITHOUTCODE' => $scripturl . '?action=activate;u=' . $memberID,

REPLACE:
'ACTIVATIONLINK' => $scripturl . '?action=activate&u=' . $memberID . '&code=' . $validation_code,
'ACTIVATIONLINKWITHOUTCODE' => $scripturl . '?action=activate&u=' . $memberID,

Please include this in the next release & keep u the good work
regards,
b.IT
Title: Re: Activation link (webmail derefferer Problem) FIX
Post by: b.IT on September 13, 2012, 04:11:47 AM
the problem is wider spread, than I initially thought, because all links for emails are consructed this way.

password reset:

Reminder.php

Find
'REMINDLINK' => $scripturl . '?action=reminder;sa=setpassword;u=' . $row['id_member'] . ';code=' . $password,

Replace
'REMINDLINK' => $scripturl . '?action=reminder&sa=setpassword&u=' . $row['id_member'] . '&code=' . $password,

I'll check for more troublesome links

Edit: Board and PM-Notification is also broken, still searching where those links are composed 
Title: Re: Activation link (webmail derefferer Problem) FIX
Post by: emanuele on September 20, 2012, 06:49:15 AM
Hello b.IT and thank you for the report and the possible fix.
Is there any webmail in particular we can check to see the issue in action?
Title: Re: Activation link (webmail derefferer Problem) FIX
Post by: Robert. on September 20, 2012, 10:49:25 AM
Thanks for the fix, I've encountered this problem a lot of times when registering with a Hotmail adress. :)

@Emanuele: I don't know about others, but I'm having this issue when registering with a Hotmail adress all the time. ;)
Title: Re: Activation link (webmail derefferer Problem) FIX
Post by: emanuele on September 20, 2012, 11:49:41 AM
/me has to find the password for his hotmail address... lol
Title: Re: Activation link (webmail derefferer Problem) FIX
Post by: Oldiesmann on September 21, 2012, 02:52:20 PM
It's a shame that Hotmail is doing that, as semicolons are indeed valid characters in URLs. They're not commonly used, but they are valid (as are several other characters which aren't commonly used in URLs).
Title: Re: Activation link (webmail derefferer Problem) FIX
Post by: Arantor on January 13, 2014, 03:42:19 PM
It's long been an issue.

We could possibly fix it more broadly in 2.1 by just splicing loadEmailTemplate to auto replace all ; with &, but longer term (3.0) we'll need to rethink our routing system anyway.