News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[Tip] Fix for malformed activation links

Started by NanoSector, August 13, 2014, 06:33:31 PM

Previous topic - Next topic

NanoSector

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.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Arantor

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.

Hj Ahmad Rasyid Hj Ismail


Advertisement: