Fixed  security token missing from logout

Jake Bunce

Well-known member
XF 1.0.3

To reproduce:

1) Disable overlays:

Admin CP -> Appearance -> Style Properties -> Overlays and Tooltips -> Enable Overlays

2) Click the logout tab on the front end:

Screen shot 2011-07-09 at 9.34.34 PM.webp

You get a security error.

To fix, edit this template:

Admin CP -> Appearance -> Templates -> navigation_visitor_tab

At the end of the template, add a security token to this code:

Code:
	<li class="navTab PopupClosed"><a href="{xen:link logout}" class="LogOut navLink visitorTabItem OverlayTrigger">{xen:phrase log_out}</a></li>

Like so:

Code:
	<li class="navTab PopupClosed"><a href="{xen:link logout, '', '_xfToken={$visitor.csrf_token_page}'}" class="LogOut navLink visitorTabItem OverlayTrigger">{xen:phrase log_out}</a></li>
 
Top Bottom