Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Thema gestartet von: NanoSector in August 13, 2014, 06:33:31 NACHMITTAGS

Titel: [Tip] Fix for malformed activation links
Beitrag von: NanoSector in August 13, 2014, 06:33:31 NACHMITTAGS
This was brought up in IRC just now. It seems like when activation mails get sent out, some e-mail clients like Hotmail like to replace ; with %3b in the URL.

This tweak will cause the user to be redirected to a proper URL, fixing this issue at the forum side.

Manual installation:

Sources/QueryString.php
Find:
// Make sure we have a valid REMOTE_ADDR.

Add before:
if (!empty($_REQUEST['action']) && substr($_SERVER['QUERY_STRING'], 0, 18) == 'action=activate%3b')
{
header('Location: ' . $scripturl . '?' . str_replace('%3b', ';', $_SERVER['QUERY_STRING']));
exit;
}


Attached is a mod package which automatically applies this tweak.
Titel: Re: [Tip] Fix for malformed activation links
Beitrag von: Colin in September 04, 2014, 01:58:55 VORMITTAG
Thank you.
Titel: Re: [Tip] Fix for malformed activation links
Beitrag von: Arantor in September 04, 2014, 05:17:28 VORMITTAG
Might be useful to get that into 2.0.9 if there's still time or at least put it into the list of possible candidates for 2.0.10 if/when that happens.
Titel: Re: [Tip] Fix for malformed activation links
Beitrag von: Hj Ahmad Rasyid Hj Ismail in September 04, 2014, 07:43:20 VORMITTAG
Good tips. +1