Squiz Query String


(Leo) #1

Matrix Version:5.3.4.2

Good morning,

Does anyone else suffering “nonce token is invalid” error in Squiz matrix? Just found that url query “?SQ_ACTION=getToken” returned nothing in our current Squiz matrix system. I tried in my Squiz vm, it returned a token string. I suspect that is the main reason that JSAPI could not be used in our system. Does anyone have any idea to solve this issue? Thanks in advance!


(John gill) #2

I don’t know what the intended use case for ?SQ_ACTION=getToken is, but it’s disabled by default.

The way to source the CSRF token is by adding this to your design

<MySource_AREA id_name="csrf_token" design_area="csrf_token"/>

That writes the token into a hidden <input> element and the JS API picks it up from there.


(Leo) #3

Thanks John. Actually, it is not a use case. I just got some error for js_api and traced it down then figured out that the SQ_ACTION=getToken returned none. Problem solved after I added csrf_token in my design file. Thank you!