<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: while I am submitting a form with post i am getting error of CSRF. in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295555#M248685</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or even better: Add a client-side UI component (YUI or Aikau) and do a regular JSON Ajax call via the proxy servlet (/share/proxy/alfresco/) without putting a custom web script in the middle. The proxy servlet already does a very fine job of properly forwarding any request to the Repository-tier, and both YUI / Aikau Ajax services already take care of requried CSRF tokens in the request headers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Dec 2016 12:56:21 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2016-12-13T12:56:21Z</dc:date>
    <item>
      <title>while I am submitting a form with post i am getting error of CSRF.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295550#M248680</link>
      <description>Hi,I have created a #dashlet which contains a from.&amp;nbsp;#&amp;lt;form id="${el}-form" action="${url.context}/page/user/${context.user.id}/dashboard" method="post"&amp;gt;&amp;lt;b&amp;gt; &amp;lt;label&amp;gt; ${msg("label.name")} &amp;lt;/label&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;input type="text" name="leadName" required="required"/&amp;gt; &amp;lt;b&amp;gt;&amp;amp;</description>
      <pubDate>Tue, 13 Dec 2016 08:07:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295550#M248680</guid>
      <dc:creator>vikash_patel</dc:creator>
      <dc:date>2016-12-13T08:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: while I am submitting a form with post i am getting error of CSRF.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295551#M248681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you explain what it is you're trying to do exactly? It looks like you're trying to POST to a dashboard page? I'm not sure if that's going to work - what are you expecting to happen to the data that is being sent (i.e. what do you have that is going to handle it?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A CSRF error usually means that you're trying to POST to a different location from the host page - but that doesn't look to be the case from the code sample that you've shared.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 08:17:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295551#M248681</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2016-12-13T08:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: while I am submitting a form with post i am getting error of CSRF.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295552#M248682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply Dave,&lt;BR /&gt;This is my code of dashlet's javascript file&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;main&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; leadName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; page&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"leadName"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; leadContactNo &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; page&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"leadContactNo"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; leadAddress &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; page&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"leadAddress"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;leadName&lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt; leadContactNo&lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt; leadAddress&lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; mylink&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;encodeURI&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"/test/myCustomRepoWebscript?leadName="&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;leadName&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;amp;leadContactNo="&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;leadContactNo&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;amp;leadAddress="&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;leadAddress&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;connector &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; remote&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;connect&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"alfresco"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt; userDetail &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; connector&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;get&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mylink&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;userDetail&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;status &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;200&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; peopleObject &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; jsonUtils&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;toObject&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;userDetail&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;BR /&gt; model&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;bodytext &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"some error"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;BR /&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="token function"&gt;main&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I wanted to submit data to a repository by using webscript with the required parameters, While submitting the form this code will call a repowebscript.&lt;BR /&gt;but while i am submitting a form with method "get" it works fine but while i am trying to submit form with "post" i am getting above error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 08:57:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295552#M248682</guid>
      <dc:creator>vikash_patel</dc:creator>
      <dc:date>2016-12-13T08:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: while I am submitting a form with post i am getting error of CSRF.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295553#M248683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you're trying to post to a different server which would be a violation of CSRF policy. You should read up on CSRF on &lt;A href="https://en.wikipedia.org/wiki/Cross-site_request_forgery" rel="nofollow noopener noreferrer"&gt;Wikipedia&lt;/A&gt;&amp;nbsp;- in particular the section on "HTTP verbs and CSRF" which explains why GET requests are allowed (essentially because they should be "safe" and not change state).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to disable the CSRF filters in Share but I would strongly recommend against that as it will introduce potential security vulnerabilities into your application. It is also possible to configure allowed URLs which you may have a valid case for if you are controlling both locations (where you're posting from and where you're posting to)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 09:21:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295553#M248683</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2016-12-13T09:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: while I am submitting a form with post i am getting error of CSRF.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295554#M248684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;B&gt;Vikash Patel&lt;/B&gt;‌, If I understand correctly, from your share presentation tier web script's controller, you are trying to make a call to repository's post web script.&amp;nbsp;Try using Connector.post instead of Connector.Get and see if it works for you.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 11:44:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295554#M248684</guid>
      <dc:creator>romschn</dc:creator>
      <dc:date>2016-12-13T11:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: while I am submitting a form with post i am getting error of CSRF.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295555#M248685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or even better: Add a client-side UI component (YUI or Aikau) and do a regular JSON Ajax call via the proxy servlet (/share/proxy/alfresco/) without putting a custom web script in the middle. The proxy servlet already does a very fine job of properly forwarding any request to the Repository-tier, and both YUI / Aikau Ajax services already take care of requried CSRF tokens in the request headers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 12:56:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295555#M248685</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2016-12-13T12:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: while I am submitting a form with post i am getting error of CSRF.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295556#M248686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Ramesh sir.&lt;BR /&gt;I have tried it using connector.post, but still i am getting the same error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 14:53:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295556#M248686</guid>
      <dc:creator>vikash_patel</dc:creator>
      <dc:date>2016-12-13T14:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: while I am submitting a form with post i am getting error of CSRF.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295557#M248687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Axel,&lt;BR /&gt;I will try to &lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;do a regular JSON Ajax call.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 14:55:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295557#M248687</guid>
      <dc:creator>vikash_patel</dc:creator>
      <dc:date>2016-12-13T14:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: while I am submitting a form with post i am getting error of CSRF.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295558#M248688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Axel,&lt;BR /&gt;I have tried to call a repo webscript using AJAX and it is working now.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 05:46:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/while-i-am-submitting-a-form-with-post-i-am-getting-error-of/m-p/295558#M248688</guid>
      <dc:creator>vikash_patel</dc:creator>
      <dc:date>2016-12-15T05:46:28Z</dc:date>
    </item>
  </channel>
</rss>

