I have just updated to Zenphoto 1.4.0.3
When I try to change some settings I constantly get the following message,
Cross site request forgery blocked.
The log says,
2011-04-13 21:16:36 124.185.67.77, 60.254.143.111 XSRF access blocked zippy Wayne Andrews Failed refresh
Installation information is below.
Can anyone help please?
Zenphoto version 1.4.0.3 [6817] (Official Build)
Current locale setting: en_US.UTF8
Current gallery theme: Default
PHP version: 5.2.17
Graphics support: PHP GD library bundled (2.0.34 compatible)
PHP memory limit: 96M (Note: Your server might allocate less!)
MySQL version: 5.0.91
Database name: zippy_zen2010
Table prefix: zp
Spam filter: none
CAPTCHA generator: zenphoto
Just looking at the code in the file " admin-functions.php"
This is what is causing the problem.
/**
This has nothing to do with cookies, so we can discount that. Zenphoto genrates a token that it posts and then checks that the token is valid when processing the posts. This is to prevent rogue websites from making posts to Zenphoto and catching you "logged in".
Of course, the code you cite is not "causing" the problem, it is detecting the cross site reference violation. The token is built from your IP address, User data, and the current session. So if one of these has changed, a violation will be indicated. None should change, but maybe sessions are not working on your site. (I see no way for the other two to "legitimately" be different.
Of course the reason that your earlier version of Zenphoto did not throw this error is that it did not protect against this security violation.
Sorry, I did not mean the code was causing a problem, the code is fine. The problem is somewhere at my end..................
I have managed to identify what is causing the conflict of IP addresses.
I use Fat Cow to host my web site. A feature that can be used with Fat Cow is Akamai.
Akamai is an edge server caching solution, aimed to speed up your site's load times across the globe. When you add a subdomain to point to Akamai's servers, your site's images, CSS and javascript will be cached for up to 4 hours on Akamai's edge servers around the world - which means faster retrieval of your site's content for visitors who aren't close proximity to FatCow's servers located in Boston, MA.
This is giving the second IP address. Of course Akamai is of no use if you use dynamic content served from a SQL database. I have now turned of that feature and problem is solved.
My Zenphoto is now working perfectly. I just have to add some more content, and fine tune.
Oh, and thanks for the prompt replies! www.wayneandrews.net/zenphoto