Topic: [SOLVED] A possible CSRF attempt was detected  (Read 8377 times)

Pages: [1] 2  All   Go Down

#1: 15-Jun-2009, 07:14 AM


rhyno
Posts: 120

Hi,
Well I some how managed to screwup my site.... Nothing new as I am a newb when it comes to MODX....

Anyway, I currently am getting the following message when I click on andthing in the manager window....
A possible CSRF attempt was detected. No referer was provided by the server.
This occures when I set the Validate HTTP_REFERER headers to Yes.... But now I can't get back into reset this.... Please help.
In trying to resolve this issue I logged out... Now I get the same error when I try to log in. I know it was stupid of me to log out... I really don;t what to re-install my modx site....
« Last Edit: 15-Jun-2009, 08:49 AM by rhyno »
The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.

-Albert Einstein (1879 - 1955)

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

#2: 15-Jun-2009, 07:32 AM


shamblett
Posts: 799

WWW
There's a column named 'validate_referer' in your <prefix>_system_settings table(0.9.6.2 here), use phpMyAdmin or some such to  see what this is set to in your database, if its '1' set it back to '0' and see if the problem persists.
Use MODx, or the cat gets it!

#3: 15-Jun-2009, 07:44 AM


rhyno
Posts: 120

I am not seeing a 'validate_referer' in my modx_system_settings table. When I search for validate on my system I get nothing. Please advice.
The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.

-Albert Einstein (1879 - 1955)

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

#4: 15-Jun-2009, 07:51 AM

Coding Team

sottwell
Posts: 12,261

WWW
It's there; it's on the third and last page of results in my phpmyadmin table browse page.
How MODx Works
Log in to an Evo Manager username guest, password guestuser.

#5: 15-Jun-2009, 08:14 AM


rhyno
Posts: 120

Sorry Susan you were right... It was there... Just on the second page.... lol

Set it to 0 it was set to 1. But Still no dice...

http://www.chrys-haefen.com/modx/modx-0.9.6.3/manager/
The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.

-Albert Einstein (1879 - 1955)

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

#6: 15-Jun-2009, 08:19 AM

Coding Team

sottwell
Posts: 12,261

WWW
Try clearing your browser cookies and cache for your domain.
How MODx Works
Log in to an Evo Manager username guest, password guestuser.

#7: 15-Jun-2009, 08:29 AM


rhyno
Posts: 120

Well we are getting closer.... It gave me the login page.... when I logged in I got the error 'A possible CSRF attempt was detected. No referer was provided by the server.' Any other ideas?
The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.

-Albert Einstein (1879 - 1955)

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

#8: 15-Jun-2009, 08:39 AM

Coding Team

sottwell
Posts: 12,261

WWW
Hm. Search the assets/cache/siteCache.idx.php file; I believe that the system settings are cached there, and it may be using it from there instead of from the database. It's on line 77 in my siteCache file.
How MODx Works
Log in to an Evo Manager username guest, password guestuser.

#9: 15-Jun-2009, 08:49 AM


rhyno
Posts: 120

That was it... Logged in and everything is going great. Thank you so much for helping me out...
The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.

-Albert Einstein (1879 - 1955)

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

#10: 3-Nov-2009, 08:20 AM

mdsdesign
Posts: 56

WWW
Can you explain in a little more detail how you cleared this up? I'm having the same issue and was pointed to this thread from my post.

#11: 7-Nov-2009, 09:14 AM


Sylvaticus
Posts: 508

I think, therefor I am. But what I am, and why...?

WWW
There's a column named 'validate_referer' in your <prefix>_system_settings table(0.9.6.2 here), use phpMyAdmin or some such to  see what this is set to in your database, if its '1' set it back to '0' and see if the problem persists.
Got my problem solved by your solution. (Thanks for sharing that Smiley )

But now I'm getting a warning in the manager:
The configuration setting Validate HTTP_REFERER headers? is Off. We recommend turning it On.

What should I do here?
« Last Edit: 7-Nov-2009, 09:17 AM by Sylvaticus »

#12: 7-Nov-2009, 10:21 AM

Moderator

OpenGeek
MODx Co-Founder
Posts: 7,728

damn accurate caricatures...

WWW
But now I'm getting a warning in the manager:
The configuration setting Validate HTTP_REFERER headers? is Off. We recommend turning it On.

What should I do here?
Your options are to get your server to set the HTTP_REFERER header properly so you can turn this feature On, or ignore the warning. Just make sure if you are logged into your manager that you don't click any suspicious links on web pages that point back to your manager; someone could trick a manager user into deleting Resources or other malicious things using this technique if you are not using the validate_referrers option.

#13: 7-Nov-2009, 10:28 AM


Sylvaticus
Posts: 508

I think, therefor I am. But what I am, and why...?

WWW
Thanks. Smiley

#14: 13-Nov-2009, 04:01 AM

amdd
Posts: 1

I'm having this issue, too. The fix with resetting both database and cache file works, but only for a short time. After having fixed the problem I log in, edit some text, klick safe, and get the error message "A possible CSRF attempt was detected. No referer was provided by the server."!

What causes the problem is that in the meantime the database has set the validate_referrer to "00" (instead of "0")...

This happens only when I work from home, the login from the office works as it should. Any ideas what causes the db to change the setting?

Does version 1.0.2 fix this issue? I'm working with 1.0.1 a the moment.

#15: 13-Nov-2009, 06:34 AM

Foundation

rthrash
Posts: 11,575

WWW
1.0.2 fixes other issues, and possibly that one too. It's a very critical upgrade.
MODx is a content management framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Please help us help you when asking for assistance and read the wiki. Searching the forums from the top level helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.

#16: 3-Feb-2010, 12:40 AM

madquirk
Posts: 1

Just to note that I had the same problem as described here after just newly installing 1.0.2 (have not used previous versions).
Had to go through both steps of changing the validate_referer value to 0 through phpMyAdmin, and in the siteCache file. All working fine now though, thanks for the help!

#17: 25-Feb-2010, 02:25 PM

dimitrix
Posts: 9

Hello everybody,

I had the same issue and nothing helped me. When i delete cookies i can connect to manager connection window, but not to the administration page. Changing validate_referer in database didnt helped neither.

So i tried to open the index.php in manager folder of my site with notepad++(any other editor works too). I found there the code for CSRF issue (juste do ctrl+F and write CSRF in the window) and i juste put this part of code in comment. And now it works.

I suppose it is not the best solution. I dont even know what does CSRF mean, but apperently it's related to hackers attempts to acces to your site. So this solution is good only when you work at home.

#18: 28-Feb-2010, 08:29 AM

dimitrix
Posts: 9

Heh, i didnt see that message about changing valid referer from siteCache.idx.php...

Now it works !

#19: 11-Mar-2010, 06:56 AM

filnug
Posts: 10

Hi there,

In my case the line "validate referer" was on line 73. Just in case it help someone.
Thanks for this post!

#20: 15-Mar-2010, 02:24 PM

Biacl Mabol
Posts: 1

Sorry for my English.

This error is only in firefox?

If is it, go to "about:conig" and set value network.http.sendRefererHeader;  to 2 (default)

it is possible that some addon change automatically this value to 0, look again after change.

Now for me it's ok!
Pages: [1] 2  All   Go Up
0 Members and 1 Guest are viewing this topic.