SecurityID doesn't match, possible CSRF attack
I'm working on a site which was coded with Silverstripe, I've got a problem with importing images from the existing folders and wonder if someone can help me on this.
I've never experienced this before, and wonder if someone can point me to the right direction to solve the problem? I can copy some code here if you let me know which part, and I'm using SilverStripe 2.4.1
Thank you very much for your help.
i've once come across this error when importing existing files in FileDataObjectManager
my fix was to add the SecurityID field the FieldSet that's returned by the getImportFields method (around line 452 in FileDataObjectManager.php):
new HiddenField('SecurityID','',Session::get('SecurityID'))
The error message is misleading. I had this error while trying to import images from a directory which did not have read permissions for the web user.
Your issue might however be something completely unrelated.
new HiddenField('SecurityID','',Session::get('SecurityID'))
does fixed for me. I am thinking it could be a older version of DOM problem, the latest version all seems alright.
精彩评论