<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[PunBB Forums - Unable to confirm security token]]></title>
	<link rel="self" href="http://punbb.informer.com/forums/feed/atom/topic/21749/"/>
	<updated>2009-11-22T04:59:57Z</updated>
	<generator>PunBB</generator>
	<id>http://punbb.informer.com/forums/topic/21749/unable-to-confirm-security-token/</id>
		<entry>
			<title type="html"><![CDATA[Re: Unable to confirm security token]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/132452/#p132452"/>
			<content type="html"><![CDATA[<p>I&#039;m getting this same error more frequently. Usually when I vote karma or sometimes replying to a post.<br />If I hit the back button and refresh, it usually works (but sucks when you get it after typing a reply to a post).</p>]]></content>
			<author>
				<name><![CDATA[chovy]]></name>
				<uri>http://punbb.informer.com/forums/user/22326/</uri>
			</author>
			<updated>2009-11-22T04:59:57Z</updated>
			<id>http://punbb.informer.com/forums/post/132452/#p132452</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Unable to confirm security token]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/129606/#p129606"/>
			<content type="html"><![CDATA[<p>Hi, </p><p>had same problem. Use get_current_url &#039;fn_get_current_url_start&#039; hook to fix it, the function is strange. It does retrieve current url by &#039;$protocol.$_SERVER[&#039;HTTP_HOST&#039;].$port.$_SERVER[&#039;REQUEST_URI&#039;];&#039; which just isn&#039;t this way in all cases.</p>]]></content>
			<author>
				<name><![CDATA[mruzicka]]></name>
				<uri>http://punbb.informer.com/forums/user/16659/</uri>
			</author>
			<updated>2009-08-14T17:36:08Z</updated>
			<id>http://punbb.informer.com/forums/post/129606/#p129606</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Unable to confirm security token]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128497/#p128497"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>tj111 wrote:</cite><blockquote><p>...I was unable to figure out how to successfully create csrf tokens for forms that exist outside of my punbb directory.</p></blockquote></div><p>You need to add hidden value to your form:<br /></p><div class="codebox"><pre><code>&lt;input type=&quot;hidden&quot; name=&quot;csrf_token&quot; value=&quot;&#039;.generate_form_token(&#039;http://site/form_handler.php&#039;).&#039;&quot; /&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Slavok]]></name>
				<uri>http://punbb.informer.com/forums/user/13265/</uri>
			</author>
			<updated>2009-06-15T14:53:45Z</updated>
			<id>http://punbb.informer.com/forums/post/128497/#p128497</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Unable to confirm security token]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128447/#p128447"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>tj111 wrote:</cite><blockquote><p>I agree it&#039;s not advisable, but I was unable to figure out how to successfully create csrf tokens for forms that exist outside of my punbb directory.</p></blockquote></div><p>It wasn&#039;t intended as a criticism. <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /> I merely mentioned it so that people don&#039;t blindly apply that change above without realising that it has drawbacks. <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[MattF]]></name>
				<uri>http://punbb.informer.com/forums/user/9938/</uri>
			</author>
			<updated>2009-06-12T16:48:57Z</updated>
			<id>http://punbb.informer.com/forums/post/128447/#p128447</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Unable to confirm security token]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128443/#p128443"/>
			<content type="html"><![CDATA[<p>I agree it&#039;s not advisable, but I was unable to figure out how to successfully create csrf tokens for forms that exist outside of my punbb directory.</p>]]></content>
			<author>
				<name><![CDATA[tj111]]></name>
				<uri>http://punbb.informer.com/forums/user/15614/</uri>
			</author>
			<updated>2009-06-12T14:34:21Z</updated>
			<id>http://punbb.informer.com/forums/post/128443/#p128443</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Unable to confirm security token]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128408/#p128408"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>tj111 wrote:</cite><blockquote><p>I too was having a similar issue after converting our CMS to use PunBB&#039;s login authentication system.&nbsp; The simple solution is to just define the constant FORUM_SKIP_CSRF_CONFIRM before including any PunBB code.&nbsp; It took some digging, but I found that check included in include/common.php before verifying the CSRF token.</p><div class="codebox"><pre><code>define(&quot;FORUM_SKIP_CSRF_CONFIRM&quot;, 1);</code></pre></div></blockquote></div><br /><p>Just a note for anyone who may read this thread. Doing as suggested above is most definitely not advisable.</p>]]></content>
			<author>
				<name><![CDATA[MattF]]></name>
				<uri>http://punbb.informer.com/forums/user/9938/</uri>
			</author>
			<updated>2009-06-09T19:19:09Z</updated>
			<id>http://punbb.informer.com/forums/post/128408/#p128408</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Unable to confirm security token]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128407/#p128407"/>
			<content type="html"><![CDATA[<p>I too was having a similar issue after converting our CMS to use PunBB&#039;s login authentication system.&nbsp; The simple solution is to just define the constant FORUM_SKIP_CSRF_CONFIRM before including any PunBB code.&nbsp; It took some digging, but I found that check included in include/common.php before verifying the CSRF token.</p><div class="codebox"><pre><code>define(&quot;FORUM_SKIP_CSRF_CONFIRM&quot;, 1);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[tj111]]></name>
				<uri>http://punbb.informer.com/forums/user/15614/</uri>
			</author>
			<updated>2009-06-09T18:02:43Z</updated>
			<id>http://punbb.informer.com/forums/post/128407/#p128407</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Unable to confirm security token]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128361/#p128361"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Wuu wrote:</cite><blockquote><p>Where i can get list of $forum_url ,or get rid off this annoying fing &quot;Unable to confirm security token&quot;. Why the hell you really need it? Anyway $forum_url[&#039;login&#039;] is for login form ,but i need for logout,post edit etcc.. <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p></blockquote></div><p>$forum_url is defined in include/url/&lt;url scheme&gt;/forum_urls.php</p><p>the security token is needed for csrf attacks, more info here: <a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery">http://en.wikipedia.org/wiki/Cross-site_request_forgery</a></p>]]></content>
			<author>
				<name><![CDATA[Cereal]]></name>
				<uri>http://punbb.informer.com/forums/user/7510/</uri>
			</author>
			<updated>2009-06-08T09:00:06Z</updated>
			<id>http://punbb.informer.com/forums/post/128361/#p128361</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Unable to confirm security token]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128360/#p128360"/>
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>$forum_page[&#039;redirect_url&#039;] = WWW.&#039;viewtopic/&#039;.$id;</p><p>$forum_page[&#039;form_action&#039;] = forum_link($forum_url[&#039;login&#039;]);</p><p>$forum_page[&#039;hidden_fields&#039;] = array(<br />&nbsp; &nbsp; &#039;form_sent&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;&lt;input type=&quot;hidden&quot; name=&quot;form_sent&quot; value=&quot;1&quot; /&gt;&#039;,<br />&nbsp; &nbsp; &#039;forum_user&#039;&nbsp; &nbsp; =&gt; &#039;&lt;input type=&quot;hidden&quot; name=&quot;form_user&quot; value=&quot;&#039;.$forum_user[&#039;username&#039;].&#039;&quot; /&gt;&#039;,<br />&nbsp; &nbsp; &#039;redirect_url&#039;&nbsp; &nbsp; =&gt; &#039;&lt;input type=&quot;hidden&quot; name=&quot;redirect_url&quot; value=&quot;&#039;.forum_htmlencode($forum_page[&#039;redirect_url&#039;]).&#039;&quot; /&gt;&#039;,<br />&nbsp; &nbsp; &#039;csrf_token&#039;&nbsp; &nbsp; =&gt; &#039;&lt;input type=&quot;hidden&quot; name=&quot;csrf_token&quot; value=&quot;&#039;.generate_form_token($forum_page[&#039;form_action&#039;]).&#039;&quot; /&gt;&#039;<br />);</p></blockquote></div><p>Where i can get list of $forum_url ,or get rid off this annoying fing &quot;Unable to confirm security token&quot;. Why the hell you really need it? Anyway $forum_url[&#039;login&#039;] is for login form ,but i need for logout,post edit etcc.. <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></content>
			<author>
				<name><![CDATA[Wuu]]></name>
				<uri>http://punbb.informer.com/forums/user/15030/</uri>
			</author>
			<updated>2009-06-08T08:51:42Z</updated>
			<id>http://punbb.informer.com/forums/post/128360/#p128360</id>
		</entry>
</feed>
