Probably this question is very easy to answer but I am not really sure about it:
Where is the value of a placeholder stored if you set a placeholder by a snippet (or by a prehook of formit)? As far as I know placeholders can be retrieved by hooks when a formit-form is submitted and the placeholder has been set by the prehook before. Does this mean that placeholders are stored in session variables or are they maybe stored in post-arrays?
I ask because I wonder if I can store secret/sensitive data in placeholders to transfer these data from snippets to snippets (e. g. from prehooks to posthooks) when the values should not be shown to any visitor of my pages (by not using the placeholder in the content of a resource) or do I have to use for this purpose 'session variables'.
If placeholders are stored in post-arrays it is probably no good idea to store sensitive data in placeholders.
Can anybody help me regarding this probably very easy question?
Letti
-
MODX Staff
- 10,725 Posts
Placeholders are stored on the MODX object only for the scope of the request, populated from REQUEST vars in the case of FormIt. They are not stored in session variables.
Thanks for the answer. Does this mean [[+placehoder]] can be used safely for secret/sensitiv-data if the placeholder is not shown in the content?
And is register_globals of matter in this case or is this completely irrelevant regarding safety of placeholders?
Thanks a lot again!
Letti