Custom HTML with JS leads to CSRF Error

Confluence User - 30 Jan, 2017

Hi all,

Simple Question: In my form i'm using the "Custom HTML" field to get a "DateTimePicker" like it was described in an old Thread How to return hh-mm in datepicker field?

So of course the JS leads to a CSRF-Error if i'm trying to submit the form, now is it possible to retrieve the OWASP_Token and POST it in the JS-Section of my HTML?

OR how can i avoid the error without editing the Owasp.CsrfGuard.properties File?

 

Thanks Everybody!

forms;customhtml;javascript;csrf

3


01 Feb, 2017
confluenceUser
confluenceUser

Hi, found a similar question at Joget OWASP_CSRFTOKEN in V5

01 Feb, 2017
confluenceUser
confluenceUser

Thanks Anders, I found it also, but isn't there an easier way than implement a secure API? I mean maybe a way to retrieve and post the token via JS?

01 Feb, 2017
confluenceUser
1
confluenceUser

Found it out by myself, the first include "jquery-min.js" leads to the error. Probably because it loads the JQuery twice, the first one from the joget source and the second one from my include. 

So sorry folks for my fundamental misunderstanding and a big thanks to Anders and Hugo for the help.

 

Have a great day (smile)

 

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print