Hi folks,
My name is Omar I'm new to JForum.
I want to add a token to an htm template by calling a java static function. The token is meant to protect the form from Cross-Site Request Forgery (CSRF) attacks, and therefore needs to be generated dynamically.
I saw similar constructions in some htm templates and since normally htm/html pages do not allow to have dynamic components I assumed that this is a JForum feature.
What i did is put the following code into the htm file:
<input type="hidden" name="csrf" value="${TokenGenerator.generateToken()}" />
However when I run the code I get the following error:
Expression TokenGenerator is undefined on line 4, column 47 in custom/forum_login.htm.
I think I also need to define that function in some configuration file, however I have no clue how to do that.
Any help would be appreciated.